File tree Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Expand file tree Collapse file tree 1 file changed +6
-3
lines changed Original file line number Diff line number Diff line change 1212 - main
1313jobs :
1414 build-and-test :
15+ strategy :
16+ matrix :
17+ node-version : [18.x, 20.x, 22.x]
1518 runs-on : ubuntu-latest
1619 steps :
1720 - uses : actions/checkout@v4
1821 with :
1922 submodules : true
2023 - uses : actions/setup-node@v4
2124 with :
22- node-version : " 18.x "
25+ node-version : " ${{ matrix.node-version }} "
2326 - name : cache node modules
2427 uses : actions/cache@v4
2528 with :
2629 path : ~/.npm # npm cache files are stored in `~/.npm` on Linux/macOS
27- key : npm-${{ hashFiles('package-lock.json') }}
30+ key : npm-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
2831 restore-keys : |
29- npm-${{ hashFiles('package-lock.json') }}
32+ npm-${{ matrix.node-version }}-${{ hashFiles('package-lock.json') }}
3033 npm-
3134 - run : npm ci
3235 - run : npm test
You can’t perform that action at this time.
0 commit comments