Skip to content

Commit

Permalink
Update CI node.js versions to 20.x (#8055)
Browse files Browse the repository at this point in the history
Upgrade our CI scripts and workflows to work in Node 20.x:
 - Updated workflows to use node 20.x across the board
 - Updated tests which use the emualtor to connect to '127.0.0.1' explicitly instead of 'localhost', since newer versions of `node` treat `localhost` differently depending on the executing OS. For instance, `localhost` might resolve to the IPv6 address `::1`, but that's not the address that the emulators bind to.
 - Updated `packages/rules-unit-testing/functions/package.json` `engines` directive to define `>=16` instead of requiring `16` explicitly.
  • Loading branch information
DellaBitta authored Mar 8, 2024
1 parent 245dd26 commit feb5038
Show file tree
Hide file tree
Showing 31 changed files with 103 additions and 101 deletions.
2 changes: 2 additions & 0 deletions .changeset/violet-ways-judge.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
4 changes: 2 additions & 2 deletions .github/workflows/canary-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
with:
# Canary release script requires git history and tags.
fetch-depth: 0
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Yarn install
run: yarn
- name: Deploy canary
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-changeset.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
with:
# This makes Actions fetch all Git history so check_changeset script can diff properly.
fetch-depth: 0
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Yarn install
run: yarn
- name: Run changeset script
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
with:
# get all history for the diff
fetch-depth: 0
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Yarn install
run: yarn
- name: Run doc generation (devsite docs)
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/check-pkg-paths.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,10 +27,10 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Yarn install
run: yarn
- name: Yarn build
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/deploy-config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Set up node (18)
- name: Set up node (20)
uses: actions/setup-node@v3
with:
node-version: 18.x
node-version: 20.x
- name: Yarn install
run: yarn
- name: Deploy project config if needed
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/e2e-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,10 +36,10 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Set up Node (18)
- name: Set up Node (20)
uses: actions/setup-node@master
with:
node-version: 18.x
node-version: 20.x
- name: install Chrome stable
run: |
sudo apt-get update
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,10 +31,10 @@ jobs:
with:
# get all history for the diff
fetch-depth: 0
- name: Set up node (16)
- name: Set up node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Yarn install
run: yarn
- name: Run formatting script
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/health-metrics-pull-request.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,7 +41,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
Expand All @@ -58,7 +58,7 @@ jobs:
- uses: actions/checkout@v3
- uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- uses: 'google-github-actions/auth@v0'
with:
credentials_json: '${{ secrets.GCP_SA_KEY }}'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/lint.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,10 +23,10 @@ jobs:

steps:
- uses: actions/checkout@v3
- name: Set up node (16)
- name: Set up node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: yarn install
run: yarn
- name: yarn lint
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/prerelease-manual-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
with:
# Canary release script requires git history and tags.
fetch-depth: 0
- name: Set up node (16)
- name: Set up node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Yarn install
run: yarn
- name: Deploy prerelease
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-log.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,10 +28,10 @@ jobs:
- name: Checkout Repo
uses: actions/checkout@master

- name: Setup Node.js 16.x
- name: Setup Node.js 20.x
uses: actions/setup-node@master
with:
node-version: 16.x
node-version: 20.x

- name: Get PR number and send to tracker.
run: node scripts/ci/log-changesets.js
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
# This makes Actions fetch all Git history so that Changesets can generate changelogs with the correct commits
fetch-depth: 0

- name: Setup Node.js 16.x
- name: Setup Node.js 20.x
uses: actions/setup-node@master
with:
node-version: 16.x
node-version: 20.x

- name: Install Dependencies
run: yarn
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-prod.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,10 +32,10 @@ jobs:
contents: write

steps:
- name: Set up node (16)
- name: Set up node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Checkout release branch (with history)
uses: actions/checkout@master
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-staging.yml
Original file line number Diff line number Diff line change
Expand Up @@ -46,10 +46,10 @@ jobs:
# Block this workflow if run on a non-release branch.
if: github.event.inputs.release-branch == 'release' || endsWith(github.event.inputs.release-branch, '-releasebranch')
steps:
- name: Set up node (16)
- name: Set up node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Merge master into release
uses: actions/github-script@v6
with:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release-tweet.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,10 +34,10 @@ jobs:
steps:
- name: Checkout Repo
uses: actions/checkout@master
- name: Setup Node.js 16.x
- name: Setup Node.js 20.x
uses: actions/setup-node@master
with:
node-version: 16.x
node-version: 20.x
- name: Poll release notes page on devsite
run: node scripts/ci/poll_release_notes.js
env:
Expand Down
20 changes: 10 additions & 10 deletions .github/workflows/test-all.yml
Original file line number Diff line number Diff line change
Expand Up @@ -42,10 +42,10 @@ jobs:
run: |
npx @puppeteer/browsers install chrome@stable
- uses: actions/checkout@v3
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
Expand Down Expand Up @@ -81,10 +81,10 @@ jobs:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
Expand Down Expand Up @@ -132,10 +132,10 @@ jobs:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
Expand Down Expand Up @@ -175,10 +175,10 @@ jobs:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
Expand Down Expand Up @@ -219,10 +219,10 @@ jobs:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- run: cp config/ci.config.json config/project.json
- run: yarn
- run: yarn build:${{ matrix.persistence }}
Expand Down
8 changes: 4 additions & 4 deletions .github/workflows/test-changed-auth.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,10 +56,10 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
Expand Down Expand Up @@ -88,10 +88,10 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-changed-fcm-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -38,10 +38,10 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Test setup and yarn install
run: |
cp config/ci.config.json config/project.json
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-changed-firestore-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -63,10 +63,10 @@ jobs:
rm -f "$output_file"
continue-on-error: true

- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: install Chrome stable
run: |
sudo apt-get update
Expand Down
24 changes: 12 additions & 12 deletions .github/workflows/test-changed-firestore.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,10 @@ jobs:
with:
# This makes Actions fetch all Git history so run-changed script can diff properly.
fetch-depth: 0
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: install Chrome stable
run: |
sudo apt-get update
Expand Down Expand Up @@ -84,10 +84,10 @@ jobs:
needs: build
if: ${{ needs.build.outputs.changed == 'true'}}
steps:
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: install Chrome stable
run: |
sudo apt-get update
Expand All @@ -112,10 +112,10 @@ jobs:
needs: build
if: ${{ needs.build.outputs.changed == 'true'}}
steps:
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: install Chrome stable
run: |
sudo apt-get update
Expand All @@ -142,10 +142,10 @@ jobs:
needs: build
if: ${{ github.event_name != 'pull_request' }}
steps:
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: install Chrome stable
run: |
sudo apt-get update
Expand Down Expand Up @@ -180,10 +180,10 @@ jobs:
run: |
sudo apt-get update
sudo apt-get install firefox
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Download build archive
uses: actions/download-artifact@v3
with:
Expand Down Expand Up @@ -219,10 +219,10 @@ jobs:
name: build.tar.gz
- name: Unzip build artifact
run: tar xf build.tar.gz
- name: Set up Node (16)
- name: Set up Node (20)
uses: actions/setup-node@v3
with:
node-version: 16.x
node-version: 20.x
- name: Test setup and yarn install
run: cp config/ci.config.json config/project.json
- name: Run tests
Expand Down
Loading

0 comments on commit feb5038

Please sign in to comment.