Skip to content

Commit 4fdf949

Browse files
committed
update lint and test GitHub Action workflow
- update actions to latest versions - use Node 14 instead of 12 - use 2 spaces instead of 4
1 parent 78a7807 commit 4fdf949

File tree

1 file changed

+35
-27
lines changed

1 file changed

+35
-27
lines changed
Lines changed: 35 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -1,31 +1,39 @@
11
name: Lint and Test
22

3-
on: pull_request
3+
on:
4+
pull_request:
5+
push:
6+
workflow_dispatch:
47

58
jobs:
6-
build:
7-
runs-on: ubuntu-latest
8-
9-
steps:
10-
- name: Checkout
11-
uses: actions/checkout@v2
12-
13-
- name: Use Node.js
14-
uses: actions/setup-node@v1
15-
with:
16-
node-version: '12.x'
17-
- name: Run npm install
18-
run: npm ci
19-
20-
- name: Lint
21-
run: npm run lint
22-
23-
- name: Test
24-
run: npm run test:unit
25-
env:
26-
CI: true
27-
- name: Cypress run
28-
uses: cypress-io/github-action@v5.1.0
29-
with:
30-
start: npm run serve
31-
wait-on: 'http://localhost:8080'
9+
build:
10+
runs-on: ubuntu-latest
11+
12+
steps:
13+
# https://github.com/actions/checkout
14+
- name: Checkout
15+
uses: actions/checkout@v4
16+
17+
# https://github.com/actions/setup-node
18+
- name: Use Node.js 14
19+
uses: actions/setup-node@v4
20+
with:
21+
node-version: '14'
22+
23+
- name: Clean install NPM packages from package-lock.json
24+
run: npm ci
25+
26+
- name: Lint
27+
run: npm run lint
28+
29+
- name: Test
30+
run: npm run test:unit
31+
env:
32+
CI: true
33+
34+
# https://github.com/cypress-io/github-action
35+
- name: Cypress run
36+
uses: cypress-io/github-action@v6
37+
with:
38+
start: npm run serve
39+
wait-on: 'http://localhost:8080'

0 commit comments

Comments
 (0)