Fix GitHub workflow legacy syntax #47
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: Test | |
# Trigger on push | |
on: | |
push: | |
branches: | |
- dev | |
jobs: | |
# build and run tests | |
build: | |
runs-on: ubuntu-latest | |
# setup node, build, run tests and publish if new release | |
steps: | |
- name: Checkout GitHub repository | |
uses: actions/checkout@v2 | |
- name: Set up Node.js 14.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '14.x' | |
- name: Install npm packages | |
working-directory: ./ | |
run: npm ci | |
- name: Build project | |
working-directory: ./ | |
run: npm run build | |
- name: Run Lint | |
working-directory: ./ | |
run: npm run lint | |
test: | |
needs: build | |
runs-on: ubuntu-latest | |
steps: | |
- name: checkout Github repository | |
uses: actions/checkout@v2 | |
- name: set up Node.js 14.x | |
uses: actions/setup-node@v1 | |
with: | |
node-version: '14.x' | |
- name: npm install | |
working-directory: ./ | |
run: npm ci | |
- name: npm test | |
run: npm test | |
working-directory: ./ | |
- name: Create test coverage artifact | |
uses: actions/upload-artifact@v1 | |
with: | |
name: coverage | |
path: ./coverage |