Skip to content

Commit 5620dbd

Browse files
committed
Update github workflow.
1 parent 6534ef8 commit 5620dbd

File tree

1 file changed

+21
-8
lines changed

1 file changed

+21
-8
lines changed

.github/workflows/test.yaml

Lines changed: 21 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -8,28 +8,42 @@ env:
88
CI: true
99

1010
jobs:
11+
lint:
12+
runs-on: ubuntu-latest
13+
if: github.event_name == 'pull_request'
14+
strategy:
15+
matrix:
16+
node-version:
17+
- "16"
18+
steps:
19+
- uses: actions/checkout@v3
20+
with:
21+
fetch-depth: 0
22+
- uses: actions/setup-node@v3
23+
with:
24+
node-version: ${{ matrix.node-version }}
25+
cache: npm
26+
- run: npm i -g npm@8.7
27+
- run: npm ci
28+
- run: npm run lint:changed-files
1129
unit:
1230
runs-on: ubuntu-latest
1331
strategy:
1432
matrix:
1533
node-version:
1634
- 14.x
1735
- 16.x
36+
- 18.x
1837
steps:
1938
- uses: actions/checkout@v1
2039
- uses: actions/setup-node@v1
2140
with:
2241
node-version: ${{ matrix.node-version }}
23-
2442
- name: Cache npm
2543
uses: actions/cache@v1
2644
with:
2745
path: ~/.npm
2846
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
29-
30-
- run: npm ci
31-
- run: npm run lint
32-
- run: npm run format
3347
- run: npm run test
3448
integration:
3549
runs-on: ubuntu-latest
@@ -38,17 +52,16 @@ jobs:
3852
node-version:
3953
- 14.x
4054
- 16.x
55+
- 18.x
4156
steps:
4257
- uses: actions/checkout@v1
4358
- uses: actions/setup-node@v1
4459
with:
4560
node-version: ${{ matrix.node-version }}
46-
4761
- name: Cache npm
4862
uses: actions/cache@v1
4963
with:
5064
path: ~/.npm
5165
key: ${{ runner.os }}-node-${{ matrix.node-version }}-${{ hashFiles('**/package-lock.json') }}
52-
53-
- run: npm install
66+
- run: npm ci
5467
- run: npm run test:bin

0 commit comments

Comments
 (0)