fix: icon dependencies (#25) #104
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
--- | |
name: CI | |
on: push | |
jobs: | |
Lint: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install | |
run: npm ci --legacy-peer-deps | |
- name: Lint | |
run: npm run lint | |
Test_Unit: | |
name: Test (node) | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install | |
run: npm ci --legacy-peer-deps | |
- name: Test | |
run: npm run test | |
Build: | |
runs-on: ubuntu-latest | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Cache | |
uses: actions/cache@v1 | |
with: | |
path: docs | |
key: ${{ github.run_id }}-docs | |
- name: Install | |
run: npm ci --legacy-peer-deps | |
- name: Build | |
run: npm run build | |
env: | |
NODE_ENV: production | |
Test_Browser_Ubuntu: | |
name: Test (${{ matrix.browser }} on ubuntu) | |
runs-on: ubuntu-latest | |
needs: | |
- Build | |
strategy: | |
fail-fast: false | |
matrix: | |
browser: | |
- firefox | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Setup xvfb | |
run: sudo apt-get install -y xvfb | |
- name: Cache | |
uses: actions/cache@v1 | |
with: | |
path: docs | |
key: ${{ github.run_id }}-docs | |
- name: Install | |
run: npm ci --legacy-peer-deps | |
- name: Test | |
run: | | |
xvfb-run --auto-servernum npx testcafe ${{ matrix.browser }}:headless test/browser/** | |
- name: Teardown | |
if: always() | |
run: | | |
xvfb_pids=`ps aux | grep tmp/xvfb-run | grep -v grep | awk '{print $2}'` | |
if [ "$xvfb_pids" != "" ]; then | |
sudo kill $xvfb_pids | |
fi | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ${{ matrix.browser }} on ubuntu | |
path: test/screenshots | |
Test_Browser_Windows: | |
name: Test (${{ matrix.browser }} on windows) | |
runs-on: windows-latest | |
needs: | |
- Build | |
strategy: | |
fail-fast: false | |
matrix: | |
browser: | |
- firefox | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Cache | |
uses: actions/cache@v1 | |
with: | |
path: docs | |
key: ${{ github.run_id }}-docs | |
- name: Install | |
run: npm ci --legacy-peer-deps | |
- name: Test | |
run: npx testcafe ${{ matrix.browser }} test/browser/** | |
- name: Upload | |
uses: actions/upload-artifact@v4 | |
if: failure() | |
with: | |
name: ${{ matrix.browser }} on windows | |
path: test/screenshots | |
Deploy_Github_Pages: | |
name: Deploy (Github Pages) | |
runs-on: ubuntu-latest | |
needs: | |
- Lint | |
- Test_Unit | |
- Build | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install | |
run: npm ci --legacy-peer-deps | |
- name: Build | |
run: npm run build | |
env: | |
NODE_ENV: production | |
- name: Setup Hosting | |
run: | | |
touch docs/.nojekyll | |
- name: Deploy | |
uses: peaceiris/actions-gh-pages@v3 | |
with: | |
cname: components.origin76.com | |
github_token: ${{ secrets.RELEASE_TOKEN }} | |
publish_dir: ./docs | |
Deploy_Package: | |
name: Deploy (NPM Package) | |
runs-on: ubuntu-latest | |
needs: | |
- Lint | |
- Test_Unit | |
- Build | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v2 | |
- name: Setup Node.js | |
uses: actions/setup-node@v2 | |
with: | |
node-version: 16 | |
- name: Install | |
run: npm ci --legacy-peer-deps | |
- name: Build | |
run: npm run build | |
env: | |
NODE_ENV: production | |
- name: Deploy | |
run: npx semantic-release@19 | |
env: | |
CI: true | |
GITHUB_TOKEN: ${{ secrets.RELEASE_TOKEN }} | |
NPM_TOKEN: ${{ secrets.NPM_TOKEN }} |