Skip to content

Commit d658e6f

Browse files
committed
chore: speed up test GHA
1 parent e3cba11 commit d658e6f

1 file changed

Lines changed: 27 additions & 12 deletions

File tree

.github/workflows/node.js.yml

Lines changed: 27 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,32 @@ on:
1111

1212
jobs:
1313
test:
14-
1514
runs-on: ubuntu-latest
16-
17-
strategy:
18-
matrix:
19-
node-version: [12.x, 14.x, 16.x]
20-
2115
steps:
22-
- uses: actions/checkout@v2
23-
- name: Test with Node.js ${{ matrix.node-version }}
24-
uses: actions/setup-node@v1
25-
with:
26-
node-version: ${{ matrix.node-version }}
27-
- run: npm ci && npm run test:clean
16+
- name: Checkout
17+
uses: actions/checkout@v2
18+
with:
19+
fetch-depth: 0
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v1
22+
with:
23+
node-version: 16
24+
- name: Cache node modules
25+
uses: actions/cache@v2
26+
env:
27+
cache-name: cache-node-modules
28+
with:
29+
# npm cache files are stored in `~/.npm` on Linux/macOS
30+
path: ~/.npm
31+
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}
32+
restore-keys: |
33+
${{ runner.os }}-build-${{ env.cache-name }}-
34+
${{ runner.os }}-build-
35+
${{ runner.os }}-
36+
- name: Install dependencies
37+
run: |
38+
npm i jest typescript rollup typedoc -g
39+
npm ci
40+
- name: Test coverage
41+
run: |
42+
npm run test:clean

0 commit comments

Comments
 (0)