Skip to content

Commit b9601a5

Browse files
authored
chore: Make cache nodejs version dependent
1 parent fa08fdd commit b9601a5

File tree

1 file changed

+15
-6
lines changed

1 file changed

+15
-6
lines changed

.github/workflows/checks.yml

Lines changed: 15 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,9 @@ jobs:
1111
tests:
1212
name: Unit tests
1313
runs-on: ubuntu-latest
14+
strategy:
15+
matrix:
16+
node-version: [14]
1417

1518
steps:
1619
- name: Checkout
@@ -19,18 +22,21 @@ jobs:
1922
uses: actions/cache@v2
2023
with:
2124
path: '**/node_modules'
22-
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
25+
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/yarn.lock') }}
2326
- name: Setup Node.js
2427
uses: actions/setup-node@v1
2528
with:
26-
node-version: 14
29+
node-version: ${{ matrix.node-version }}
2730
- name: Install dependencies
2831
run: yarn install --frozen-lockfile --non-interactive
2932
- name: Unit tests
3033
run: yarn test -- --ci
3134
lint:
3235
name: Lint
3336
runs-on: ubuntu-latest
37+
strategy:
38+
matrix:
39+
node-version: [14]
3440

3541
steps:
3642
- name: Checkout
@@ -39,11 +45,11 @@ jobs:
3945
uses: actions/cache@v2
4046
with:
4147
path: '**/node_modules'
42-
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
48+
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/yarn.lock') }}
4349
- name: Setup Node.js
4450
uses: actions/setup-node@v1
4551
with:
46-
node-version: 14
52+
node-version: ${{ matrix.node-version }}
4753
- name: Install dependencies
4854
run: yarn install --frozen-lockfile --non-interactive
4955
- name: Lint
@@ -52,6 +58,9 @@ jobs:
5258
name: Test build website
5359
if: ${{ github.event.issue.pull_request }}
5460
runs-on: ubuntu-latest
61+
strategy:
62+
matrix:
63+
node-version: [14]
5564

5665
steps:
5766
- name: Checkout
@@ -60,11 +69,11 @@ jobs:
6069
uses: actions/cache@v2
6170
with:
6271
path: '**/node_modules'
63-
key: ${{ runner.os }}-modules-${{ hashFiles('**/yarn.lock') }}
72+
key: ${{ runner.os }}-${{ matrix.node-version }}-modules-${{ hashFiles('**/yarn.lock') }}
6473
- name: Setup Node.js
6574
uses: actions/setup-node@v1
6675
with:
67-
node-version: 14
76+
node-version: ${{ matrix.node-version }}
6877
- name: Install dependencies
6978
run: yarn install --frozen-lockfile --non-interactive
7079
- name: Build website

0 commit comments

Comments
 (0)