Skip to content

Commit ffa42a7

Browse files
swissspidymattKorwelNTaylorMullen
authored
chore: Expand node version test matrix (google-gemini#2700)
Co-authored-by: matt korwel <matt.korwel@gmail.com> Co-authored-by: N. Taylor Mullen <ntaylormullen@google.com>
1 parent 5066bc5 commit ffa42a7

File tree

3 files changed

+13
-29
lines changed

3 files changed

+13
-29
lines changed

.github/workflows/ci.yml

Lines changed: 9 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -10,22 +10,19 @@ on:
1010
merge_group:
1111

1212
jobs:
13-
build:
14-
name: Build and Lint
13+
lint:
14+
name: Lint
1515
runs-on: ubuntu-latest
1616
permissions:
1717
contents: read # For checkout
18-
strategy:
19-
matrix:
20-
node-version: [20.x, 22.x, 24.x]
2118
steps:
2219
- name: Checkout repository
2320
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2421

25-
- name: Set up Node.js ${{ matrix.node-version }}
22+
- name: Set up Node.js
2623
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
2724
with:
28-
node-version: ${{ matrix.node-version }}
25+
node-version-file: '.nvmrc'
2926
cache: 'npm'
3027

3128
- name: Install dependencies
@@ -45,24 +42,17 @@ jobs:
4542
- name: Run type check
4643
run: npm run typecheck
4744

48-
- name: Upload build artifacts
49-
uses: actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4
50-
with:
51-
name: build-artifacts-${{ matrix.node-version }}
52-
path: |
53-
packages/*/dist
54-
package-lock.json # Only upload dist and lockfile
5545
test:
5646
name: Test
5747
runs-on: ubuntu-latest
58-
needs: build # This job depends on the 'build' job
48+
needs: lint
5949
permissions:
6050
contents: read
6151
checks: write
6252
pull-requests: write
6353
strategy:
6454
matrix:
65-
node-version: [20.x, 22.x, 24.x] # Should match the build job's matrix
55+
node-version: [20.x, 22.x, 24.x]
6656
steps:
6757
- name: Checkout repository
6858
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
@@ -73,16 +63,8 @@ jobs:
7363
node-version: ${{ matrix.node-version }}
7464
cache: 'npm'
7565

76-
- name: Download build artifacts
77-
uses: actions/download-artifact@d3f86a106a0bac45b974a628896c90dbdf5c8093 # v4
78-
with:
79-
name: build-artifacts-${{ matrix.node-version }}
80-
path: . # Download to the root, this will include package-lock.json and packages/*/dist
81-
82-
# Restore/create package structure for dist folders if necessary.
83-
# The download-artifact action with path: . should place them correctly if the
84-
# upload paths were relative to the workspace root.
85-
# Example: if uploaded `packages/cli/dist`, it will be at `./packages/cli/dist`.
66+
- name: Build project
67+
run: npm run build
8668

8769
- name: Install dependencies for testing
8870
run: npm ci # Install fresh dependencies using the downloaded package-lock.json
@@ -92,7 +74,7 @@ jobs:
9274

9375
- name: Publish Test Report (for non-forks)
9476
if: always() && (github.event.pull_request.head.repo.full_name == github.repository)
95-
uses: dorny/test-reporter@890a17cecf52a379fc869ab770a71657660be727 # v2
77+
uses: dorny/test-reporter@dc3a92680fcc15842eef52e8c4606ea7ce6bd3f3 # v2
9678
with:
9779
name: Test Results (Node ${{ matrix.node-version }})
9880
path: packages/*/junit.xml

.github/workflows/e2e.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -14,14 +14,15 @@ jobs:
1414
strategy:
1515
matrix:
1616
sandbox: [sandbox:none, sandbox:docker]
17+
node-version: [20.x, 22.x, 24.x]
1718
steps:
1819
- name: Checkout repository
1920
uses: actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4
2021

21-
- name: Set up Node.js
22+
- name: Set up Node.js ${{ matrix.node-version }}
2223
uses: actions/setup-node@49933ea5288caeca8642d1e84afbd3f7d6820020 # v4
2324
with:
24-
node-version: 20.x
25+
node-version: ${{ matrix.node-version }}
2526
cache: 'npm'
2627

2728
- name: Install dependencies

.nvmrc

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
20

0 commit comments

Comments
 (0)