-
-
Notifications
You must be signed in to change notification settings - Fork 142
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
update lint and test GitHub Action workflow
- update actions to latest versions - use Node 14 instead of 12 - use 2 spaces instead of 4
- Loading branch information
1 parent
78a7807
commit 4fdf949
Showing
1 changed file
with
35 additions
and
27 deletions.
There are no files selected for viewing
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,31 +1,39 @@ | ||
name: Lint and Test | ||
|
||
on: pull_request | ||
on: | ||
pull_request: | ||
push: | ||
workflow_dispatch: | ||
|
||
jobs: | ||
build: | ||
runs-on: ubuntu-latest | ||
|
||
steps: | ||
- name: Checkout | ||
uses: actions/checkout@v2 | ||
|
||
- name: Use Node.js | ||
uses: actions/setup-node@v1 | ||
with: | ||
node-version: '12.x' | ||
- name: Run npm install | ||
run: npm ci | ||
|
||
- name: Lint | ||
run: npm run lint | ||
|
||
- name: Test | ||
run: npm run test:unit | ||
env: | ||
CI: true | ||
- name: Cypress run | ||
uses: cypress-io/[email protected] | ||
with: | ||
start: npm run serve | ||
wait-on: 'http://localhost:8080' | ||
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' |