Skip to content

Commit 8957ebf

Browse files
authored
chore(ci): Run CI on node test matrix (#134)
* chore(ci): Run CI on node test matrix * add missing matrix
1 parent c27b405 commit 8957ebf

File tree

1 file changed

+26
-8
lines changed

1 file changed

+26
-8
lines changed

.github/workflows/lint-test-sdk.yml

Lines changed: 26 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -7,16 +7,25 @@ on:
77
jobs:
88
lint-test-sdk:
99
runs-on: ubuntu-latest
10+
strategy:
11+
matrix:
12+
node-version: [ '18', '20', '22', '23' ]
1013
steps:
1114
- uses: actions/checkout@v3
1215
- name: Use Node.js
1316
uses: actions/setup-node@v3
1417
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'`)
1724
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-
2029
- name: 'Set up GCP SDK for downloading test data'
2130
uses: 'google-github-actions/setup-gcloud@v0'
2231
- name: Install SDK dependencies
@@ -30,16 +39,25 @@ jobs:
3039
working-directory: ./
3140
typecheck:
3241
runs-on: ubuntu-latest
42+
strategy:
43+
matrix:
44+
node-version: [ '18', '20', '22', '23' ]
3345
steps:
3446
- uses: actions/checkout@v3
3547
- name: Use Node.js
3648
uses: actions/setup-node@v3
3749
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'`)
4056
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-
4361
- name: Install SDK dependencies
4462
run: yarn --frozen-lockfile
4563
working-directory: ./

0 commit comments

Comments
 (0)