Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

ci: use node v20 for most jobs #29959

Merged
merged 9 commits into from
Jul 1, 2024
Merged
Show file tree
Hide file tree
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
42 changes: 25 additions & 17 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,8 @@ concurrency:

env:
DEFAULT_BRANCH: ${{ github.event.repository.default_branch }}
NODE_VERSION: 18
NODE_VERSION_TEST: 18
NODE_VERSION_BUILD: 20
DRY_RUN: true
TEST_LEGACY_DECRYPTION: true
SPARSE_CHECKOUT: |-
Expand Down Expand Up @@ -105,13 +106,13 @@ jobs:
with:
repo: ${{ github.event.repository.full_name }}
token: ${{ github.token }}
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_TEST }}

- name: Prefetch modules for `ubuntu-latest`
- name: Prefetch test modules for `ubuntu-latest`
id: setup-node
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_TEST }}
os: ${{ runner.os }}
save-cache: true

Expand All @@ -124,6 +125,14 @@ jobs:
run: |
echo "$(pnpm -s schedule-test-shards)" >> "$GITHUB_OUTPUT"

- name: Prefetch build modules for `ubuntu-latest`
id: setup-node
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION_BUILD }}
os: ${{ runner.os }}
save-cache: true

prefetch:
needs: [setup]

Expand All @@ -142,7 +151,6 @@ jobs:
strategy:
matrix:
os: ${{ fromJSON(needs.setup.outputs.os-matrix-prefetch) }}
node-version: [18]

runs-on: ${{ matrix.os }}

Expand All @@ -161,7 +169,7 @@ jobs:
if: needs.setup.outputs.os-matrix-is-full && runner.os != 'Linux'
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_TEST }}
os: ${{ runner.os }}
save-cache: true

Expand All @@ -182,7 +190,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_BUILD }}
os: ${{ runner.os }}

- name: Restore eslint cache
Expand Down Expand Up @@ -227,7 +235,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_BUILD }}
os: ${{ runner.os }}

- name: Restore prettier cache
Expand Down Expand Up @@ -269,7 +277,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_BUILD }}
os: ${{ runner.os }}

- name: Lint markdown
Expand Down Expand Up @@ -298,7 +306,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_BUILD }}
os: ${{ runner.os }}

- name: Type check
Expand Down Expand Up @@ -337,7 +345,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_TEST }}
os: ${{ runner.os }}

- name: Cache jest
Expand All @@ -348,7 +356,7 @@ jobs:
jest-cache-${{
runner.os
}}-${{
env.NODE_VERSION
env.NODE_VERSION_TEST
}}-${{
hashFiles('pnpm-lock.yaml')
}}-${{
Expand Down Expand Up @@ -430,7 +438,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_BUILD }}
os: ${{ runner.os }}

- name: Download coverage reports
Expand Down Expand Up @@ -518,7 +526,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_BUILD }}
os: ${{ runner.os }}

- name: Build
Expand Down Expand Up @@ -552,7 +560,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_BUILD }}
os: ${{ runner.os }}

- name: Build
Expand Down Expand Up @@ -588,7 +596,7 @@ jobs:
- name: Setup Node.js
uses: actions/setup-node@60edb5dd545a775178f52524783378180af0d1f8 # v4.0.2
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_TEST }}

- name: Download package
uses: actions/download-artifact@65a9edc5881444af0b9093a5e628f2fe47ea3b2e # v4.1.7
Expand Down Expand Up @@ -639,7 +647,7 @@ jobs:
- name: Setup Node.js
uses: ./.github/actions/setup-node
with:
node-version: ${{ env.NODE_VERSION }}
node-version: ${{ env.NODE_VERSION_BUILD }}
os: ${{ runner.os }}

- uses: sigstore/cosign-installer@59acb6260d9c0ba8f4a2f9d9b48431a222b68e20 # v3.5.0
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/update-data.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
workflow_dispatch:

env:
NODE_VERSION: 18
NODE_VERSION: 20

permissions:
contents: read
Expand Down