7
7
jobs :
8
8
lint-test-sdk :
9
9
runs-on : ubuntu-latest
10
+ strategy :
11
+ matrix :
12
+ node-version : [ '18', '20', '22', '23' ]
10
13
steps :
11
14
- uses : actions/checkout@v3
12
15
- name : Use Node.js
13
16
uses : actions/setup-node@v3
14
17
with :
15
- node-version : ' 18.x'
16
- - uses : actions/cache@v2
18
+ node-version : ${{ matrix.node-version }}
19
+ - name : Get yarn cache directory path
20
+ id : yarn-cache-dir-path
21
+ run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
22
+ - uses : actions/cache@v4
23
+ id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
17
24
with :
18
- path : ' ./node_modules'
19
- key : ${{ runner.os }}-root-node-modules-${{ hashFiles('./yarn.lock') }}
25
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
26
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
27
+ restore-keys : |
28
+ ${{ runner.os }}-yarn-
20
29
- name : ' Set up GCP SDK for downloading test data'
21
30
uses : ' google-github-actions/setup-gcloud@v0'
22
31
- name : Install SDK dependencies
@@ -30,16 +39,25 @@ jobs:
30
39
working-directory : ./
31
40
typecheck :
32
41
runs-on : ubuntu-latest
42
+ strategy :
43
+ matrix :
44
+ node-version : [ '18', '20', '22', '23' ]
33
45
steps :
34
46
- uses : actions/checkout@v3
35
47
- name : Use Node.js
36
48
uses : actions/setup-node@v3
37
49
with :
38
- node-version : ' 18.x'
39
- - uses : actions/cache@v2
50
+ node-version : ${{ matrix.node-version }}
51
+ - name : Get yarn cache directory path
52
+ id : yarn-cache-dir-path
53
+ run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
54
+ - uses : actions/cache@v4
55
+ id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
40
56
with :
41
- path : ' ./node_modules'
42
- key : ${{ runner.os }}-root-node-modules-${{ hashFiles('./yarn.lock') }}
57
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
58
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
59
+ restore-keys : |
60
+ ${{ runner.os }}-yarn-
43
61
- name : Install SDK dependencies
44
62
run : yarn --frozen-lockfile
45
63
working-directory : ./
0 commit comments