19
19
type : string
20
20
description : The branch of the SDK to test
21
21
required : false
22
-
22
+
23
23
jobs :
24
24
lint-test-sdk :
25
25
runs-on : ubuntu-latest
26
+ strategy :
27
+ matrix :
28
+ node-version : [ '18', '20', '22', '23' ]
26
29
steps :
27
- - uses : actions/checkout@v2
28
- with :
29
- repository : Eppo-exp/node-server-sdk
30
- ref : ${{ env.SDK_BRANCH_NAME }}
30
+ - uses : actions/checkout@v3
31
31
- name : Use Node.js
32
- uses : actions/setup-node@v1
32
+ uses : actions/setup-node@v3
33
33
with :
34
- node-version : ' 18.x'
35
- - uses : actions/cache@v2
34
+ node-version : ${{ matrix.node-version }}
35
+ - name : Get yarn cache directory path
36
+ id : yarn-cache-dir-path
37
+ run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
38
+ - uses : actions/cache@v4
39
+ id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
36
40
with :
37
- path : ' ./node_modules'
38
- key : ${{ runner.os }}-root-node-modules-${{ hashFiles('./yarn.lock') }}
41
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
42
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
43
+ restore-keys : |
44
+ ${{ runner.os }}-yarn-
39
45
- name : Install root dependencies
40
46
run : yarn --frozen-lockfile
41
47
working-directory : ./
@@ -50,19 +56,25 @@ jobs:
50
56
working-directory : ./
51
57
typecheck :
52
58
runs-on : ubuntu-latest
59
+ strategy :
60
+ matrix :
61
+ node-version : [ '18', '20', '22', '23' ]
53
62
steps :
54
- - uses : actions/checkout@v2
55
- with :
56
- repository : Eppo-exp/node-server-sdk
57
- ref : ${{ env.SDK_BRANCH_NAME }}
63
+ - uses : actions/checkout@v3
58
64
- name : Use Node.js
59
- uses : actions/setup-node@v1
65
+ uses : actions/setup-node@v3
60
66
with :
61
- node-version : ' 18.x'
62
- - uses : actions/cache@v2
67
+ node-version : ${{ matrix.node-version }}
68
+ - name : Get yarn cache directory path
69
+ id : yarn-cache-dir-path
70
+ run : echo "dir=$(yarn cache dir)" >> $GITHUB_OUTPUT
71
+ - uses : actions/cache@v4
72
+ id : yarn-cache # use this to check for `cache-hit` (`steps.yarn-cache.outputs.cache-hit != 'true'`)
63
73
with :
64
- path : ' ./node_modules'
65
- key : ${{ runner.os }}-root-node-modules-${{ hashFiles('./yarn.lock') }}
74
+ path : ${{ steps.yarn-cache-dir-path.outputs.dir }}
75
+ key : ${{ runner.os }}-yarn-${{ hashFiles('**/yarn.lock') }}
76
+ restore-keys : |
77
+ ${{ runner.os }}-yarn-
66
78
- name : Install root dependencies
67
79
run : yarn --frozen-lockfile
68
80
working-directory : ./
0 commit comments