Skip to content

Commit 67b31f1

Browse files
committed
ci: update workflow
1 parent 4dd89cf commit 67b31f1

File tree

1 file changed

+8
-24
lines changed

1 file changed

+8
-24
lines changed

.github/workflows/nodejs.yml

Lines changed: 8 additions & 24 deletions
Original file line numberDiff line numberDiff line change
@@ -8,31 +8,15 @@ jobs:
88
runs-on: 'ubuntu-latest'
99
strategy:
1010
matrix:
11-
node_version: [12, 14, 16]
11+
node_version: [12, 14, 16, 18, 20, 22]
1212
os: ['ubuntu-latest']
1313
steps:
14-
- name: 'Checkout'
15-
uses: 'actions/checkout@master'
16-
17-
- name: 'Use Node.js ${{ matrix.node_version }}'
18-
uses: 'actions/setup-node@v2'
14+
- uses: actions/checkout@v4
1915
with:
20-
node-version: '${{ matrix.node_version }}'
21-
22-
- name: 'Cache node modules'
23-
uses: 'actions/cache@v2'
24-
env:
25-
cache-name: 'cache-node-modules'
16+
persist-credentials: false
17+
- uses: actions/setup-node@v4
2618
with:
27-
path: '~/.npm' # npm cache files are stored in `~/.npm` on Linux/macOS
28-
key: "${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/package-lock.json') }}"
29-
restore-keys: |
30-
${{ runner.os }}-build-${{ env.cache-name }}-
31-
${{ runner.os }}-build-
32-
${{ runner.os }}-
33-
34-
- name: 'Install Dependencies'
35-
run: 'npm ci'
36-
37-
- name: 'Run Tests'
38-
run: 'npm test'
19+
node-version: ${{ matrix.node_version }}
20+
cache: 'npm'
21+
- run: npm ci --ignore-scripts
22+
- run: npm test

0 commit comments

Comments
 (0)