Skip to content

Commit

Permalink
[fei5484.1.node20actions] Update actions to Node 20 variants (#1021)
Browse files Browse the repository at this point in the history
## Summary:
This updates our actions to use the Node 20 variants. This should mean almost no more Node 16 deprecation warnings, however, the `preactjs/compressed-size-action` has no Node 20 variant yet.

Issue: FEI-5484

## Test plan:
Put the PR up and see that the workflows run without any Node 16 deprecation warnings - except for those about `preactjs/compressed-size-action`.

Author: somewhatabstract

Reviewers: jeresig

Required Reviewers:

Approved By: jeresig

Checks: ✅ codecov/project, ✅ Test (macos-latest, 20.x), ✅ CodeQL, ✅ Lint, typecheck, and coverage check (ubuntu-latest, 20.x), ⏭️  dependabot, ✅ Analyze (javascript), ✅ Prime node_modules cache for primary configuration (ubuntu-latest, 20.x), ✅ gerald

Pull Request URL: #1021
  • Loading branch information
somewhatabstract authored Apr 8, 2024
1 parent 62e4f13 commit 509c2a5
Show file tree
Hide file tree
Showing 8 changed files with 31 additions and 29 deletions.
2 changes: 2 additions & 0 deletions .changeset/forty-geckos-begin.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
---
---
8 changes: 4 additions & 4 deletions .github/workflows/codeql-analysis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,11 +49,11 @@ jobs:

steps:
- name: Checkout repository
uses: actions/checkout@v3
uses: actions/checkout@v4

# Initializes the CodeQL tools for scanning.
- name: Initialize CodeQL
uses: github/codeql-action/init@v2
uses: github/codeql-action/init@v3
with:
languages: ${{ matrix.language }}
# If you wish to specify custom queries, you can do so here or in a config file.
Expand All @@ -64,7 +64,7 @@ jobs:
# Autobuild attempts to build any compiled languages (C/C++, C#, or Java).
# If this step fails, then you should remove it and run the build manually (see below)
- name: Autobuild
uses: github/codeql-action/autobuild@v2
uses: github/codeql-action/autobuild@v3

# ℹ️ Command-line programs to run using the OS shell.
# 📚 https://git.io/JvXDl
Expand All @@ -78,4 +78,4 @@ jobs:
# make release

- name: Perform CodeQL Analysis
uses: github/codeql-action/analyze@v2
uses: github/codeql-action/analyze@v3
2 changes: 1 addition & 1 deletion .github/workflows/dependabot-approve-and-merge.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,7 @@ jobs:
# will not occur.
- name: Dependabot metadata
id: dependabot-metadata
uses: dependabot/fetch-metadata@v1.1.1
uses: dependabot/fetch-metadata@v2
with:
github-token: "${{ secrets.GITHUB_TOKEN }}"
# Here the PR gets approved.
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/gerald-pr.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,7 +11,7 @@ jobs:
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]' && (github.event.action != 'edited' || github.event.changes.base != null)
runs-on: ubuntu-latest
steps:
- uses: Khan/actions@gerald-pr-v1
- uses: Khan/actions@gerald-pr-v3
with:
token: ${{ secrets.GITHUB_TOKEN }}
admin-token: ${{ secrets.KHAN_ACTIONS_BOT_TOKEN }}
4 changes: 2 additions & 2 deletions .github/workflows/gerald-push.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,14 +11,14 @@ jobs:
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ref: '${{ github.ref }}'
# GitHub Actions doesn't allow us to take the length of github.event.commits, so we have to pass the array into node and take the length there.
# We add one to the length because we want to get the diff between the last commit and the commit before the first commit.
fetch-depth: '$(node -e "console.log(${{ github.event.commits }}.length + 1")'
- name: Run Gerald
uses: Khan/gerald@v3.1
uses: Khan/gerald@main
env:
GITHUB_TOKEN: '${{ secrets.GITHUB_TOKEN }}'
ADMIN_PERMISSION_TOKEN: '${{ secrets.KHAN_ACTIONS_BOT_TOKEN }}'
Expand Down
10 changes: 5 additions & 5 deletions .github/workflows/node-ci-main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -28,9 +28,9 @@ jobs:
os: [ubuntu-latest]
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install & cache node_modules
uses: Khan/actions@shared-node-cache-v0
uses: Khan/actions@shared-node-cache-v2
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -48,14 +48,14 @@ jobs:
os: [ubuntu-latest]
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install & cache node_modules
uses: Khan/actions@shared-node-cache-v0
uses: Khan/actions@shared-node-cache-v2
with:
node-version: ${{ matrix.node-version }}
- name: Run tests with coverage
run: yarn coverage
- name: Upload Coverage
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
28 changes: 14 additions & 14 deletions .github/workflows/node-ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -27,9 +27,9 @@ jobs:
os: [ubuntu-latest]
node-version: [20.x]
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- name: Install & cache node_modules
uses: Khan/actions@shared-node-cache-v0
uses: Khan/actions@shared-node-cache-v2
with:
node-version: ${{ matrix.node-version }}

Expand All @@ -45,25 +45,25 @@ jobs:
node-version: [20.x]
steps:
- name: Checking out latest commit
uses: actions/checkout@v3
uses: actions/checkout@v4
- name: Install & cache node_modules
uses: Khan/actions@shared-node-cache-v0
uses: Khan/actions@shared-node-cache-v2
with:
node-version: ${{ matrix.node-version }}

- name: Get All Changed Files
uses: Khan/actions@get-changed-files-v1
uses: Khan/actions@get-changed-files-v2
id: changed

- id: js-ts-files
name: Find .js/.ts changed files
uses: Khan/actions@filter-files-v0
uses: Khan/actions@filter-files-v1
with:
changed-files: ${{ steps.changed.outputs.files }}
extensions: '.js,.jsx,.ts,.tsx'

- id: eslint-reset
uses: Khan/actions@filter-files-v0
uses: Khan/actions@filter-files-v1
name: Files that would trigger a full eslint run
with:
changed-files: ${{ steps.changed.outputs.files }}
Expand Down Expand Up @@ -94,13 +94,13 @@ jobs:
- name: Upload Coverage
# We don't bother collecting a record of coverage for dependabot changes
if: ${{ github.actor != 'dependabot[bot]' }}
uses: codecov/codecov-action@v3
uses: codecov/codecov-action@v4
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/coverage-final.json
fail_ci_if_error: true

- uses: Khan/actions@check-for-changeset-v0
- uses: Khan/actions@check-for-changeset-v1
if: github.actor != 'dependabot[bot]' && github.actor != 'dependabot-preview[bot]'
with:
exclude: .github/,.storybook/
Expand Down Expand Up @@ -144,22 +144,22 @@ jobs:
- os: ubuntu-latest
node-version: 20.x
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4

- name: Install & cache node_modules
uses: Khan/actions@shared-node-cache-v0
uses: Khan/actions@shared-node-cache-v2
with:
node-version: ${{ matrix.node-version }}

- name: Get All Changed Files
uses: Khan/actions@get-changed-files-v1
uses: Khan/actions@get-changed-files-v2
id: changed

- name: Build so that inter-package references are resolved
run: yarn build

- id: jest-reset
uses: Khan/actions@filter-files-v0
uses: Khan/actions@filter-files-v1
name: Files that would trigger a full Jest run
with:
changed-files: ${{ steps.changed.outputs.files }}
Expand All @@ -171,7 +171,7 @@ jobs:
- id: js-ts-files
name: Find .js/.ts changed files
uses: Khan/actions@filter-files-v0
uses: Khan/actions@filter-files-v1
with:
changed-files: ${{ steps.changed.outputs.files }}
extensions: '.js,.jsx,.ts,.tsx'
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,13 +31,13 @@ jobs:
name: Release
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
with:
ssh-key: ${{ secrets.KHAN_ACTIONS_BOT_SSH_PRIVATE_KEY }}
fetch-depth: 0

- name: Install & cache node_modules
uses: Khan/actions@shared-node-cache-v0
uses: Khan/actions@shared-node-cache-v2
with:
node-version: 20.x

Expand Down

0 comments on commit 509c2a5

Please sign in to comment.