Skip to content

Commit ead5beb

Browse files
committed
ci(test): validate typescript, run lint only once
1 parent f7fa8fb commit ead5beb

File tree

1 file changed

+21
-4
lines changed

1 file changed

+21
-4
lines changed

.github/workflows/test.yml

Lines changed: 21 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -7,20 +7,37 @@ name: Test
77
types:
88
- opened
99
- synchronize
10+
1011
jobs:
11-
test:
12+
test_matrix:
1213
runs-on: ubuntu-latest
1314
strategy:
1415
matrix:
1516
node_version:
1617
- 10
1718
- 12
1819
- 14
20+
1921
steps:
2022
- uses: actions/checkout@v2
21-
- name: "Use Node.js ${{ matrix.node_version }}"
23+
- name: Use Node.js \${{ matrix.node_version }}
2224
uses: actions/setup-node@v2
2325
with:
24-
node-version: "${{ matrix.node_version }}"
26+
node-version: \${{ matrix.node_version }}
27+
- uses: actions/cache@v1
28+
with:
29+
path: ~/.npm
30+
key: \${{ runner.os }}-node-\${{ hashFiles('**/package-lock.json') }}
31+
restore-keys: |
32+
\${{ runner.os }}-node-
33+
- run: npm ci
34+
- run: npm test --ignore-scripts # run lint only once
35+
36+
test:
37+
runs-on: ubuntu-latest
38+
needs: test_matrix
39+
steps:
40+
- uses: actions/checkout@v2
2541
- run: npm ci
26-
- run: npm test
42+
- run: npm lint
43+
- run: npm run test:typescript

0 commit comments

Comments
 (0)