update lint and test GitHub Action workflow #1
Workflow file for this run
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: Lint and Test | |
on: | |
pull_request: | |
push: | |
workflow_dispatch: | |
jobs: | |
build: | |
runs-on: ubuntu-latest | |
steps: | |
# https://github.com/actions/checkout | |
- name: Checkout | |
uses: actions/checkout@v4 | |
# https://github.com/actions/setup-node | |
- name: Use Node.js 14 | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '14' | |
- name: Clean install NPM packages from package-lock.json | |
run: npm ci | |
- name: Lint | |
run: npm run lint | |
- name: Test | |
run: npm run test:unit | |
env: | |
CI: true | |
# https://github.com/cypress-io/github-action | |
- name: Cypress run | |
uses: cypress-io/github-action@v6 | |
with: | |
start: npm run serve | |
wait-on: 'http://localhost:8080' |