Merge pull request #78 from SimonMueller/dependabot/npm_and_yarn/asyn… #419
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: Node CI | |
on: [push] | |
jobs: | |
test: | |
name: Test on Node.js ${{ matrix.node_version }} and ${{ matrix.os }} | |
runs-on: ${{ matrix.os }} | |
strategy: | |
matrix: | |
node_version: ['16'] | |
os: [ubuntu-latest, windows-latest, macos-latest] | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
- name: Setup Node.js | |
uses: actions/setup-node@v3 | |
with: | |
node-version: ${{ matrix.node_version }} | |
- name: npm install | |
run: npm ci | |
- name: webpack build | |
run: npm run build | |
env: | |
CI: true | |
- name: lint | |
run: npm run lint | |
- name: test | |
run: npm run test:coverage | |
env: | |
CI: true | |
- name: upload master build artifact | |
uses: actions/upload-artifact@v2 | |
if: github.ref == 'refs/heads/master' | |
with: | |
name: build-${{ matrix.os }} | |
path: build | |
deploy: | |
name: Deploy master to GitHub Pages | |
runs-on: ubuntu-latest | |
needs: test | |
if: github.ref == 'refs/heads/master' | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v3 | |
with: | |
persist-credentials: false | |
- name: download artifact | |
uses: actions/download-artifact@v2 | |
with: | |
path: build | |
name: build-ubuntu-latest | |
- name: deploy | |
uses: JamesIves/github-pages-deploy-action@v4.2.5 | |
with: | |
branch: gh-pages | |
folder: build | |
clean: true | |