Skip to content

ci: move GitHub Actions to their Node 24 majors - #441

Merged
mmcky merged 1 commit into
mainfrom
maint/node24-actions
Sep 18, 2026
Merged

mmcky merged 1 commit into
mainfrom
maint/node24-actions

Conversation

@mmcky

@mmcky mmcky commented Sep 18, 2026

Copy link
Copy Markdown
Contributor

This moves the last below-node24 action in quantecon-book-theme onto Node 24. It is part of the Node 24 upgrade across the QuantEcon lecture and theme fleets: Node 20 reached end-of-life on 2026-04-30, and GitHub's core actions now run on node24.

What changes

The only change is to the pre-commit job in tests.yml, which no longer uses pre-commit/[email protected]. That action is a composite that nests actions/cache@v4 (node20), and its maintainer has declined to publish a Node 24 release. The job now runs the action's own steps directly, so its behaviour is unchanged:

  • python -m pip install pre-commit, then python -m pip freeze --local for the log. This uses the Python 3.13 that actions/setup-python@v7 already sets up in the job.
  • actions/cache@v6 on ~/.cache/pre-commit, with the action's own key: pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}. pythonLocation carries the full interpreter version, so a Python update or a hook change invalidates the cache, as before.
  • pre-commit run --show-diff-on-failure --color=always --all-files. A failing hook exits non-zero and fails the job, exactly as the action did.

The earliest node24 major of actions/cache is v5. This uses v6, the current major and the target in the fleet plan, which saves an immediate Dependabot bump. v6 only moves the action to ESM, and its inputs are unchanged.

Pins

Workflow Action From To Runtime
tests.yml pre-commit/action v3.0.1 (composite, nests actions/cache@v4) removed, replaced by run steps node20 inside, before
tests.yml actions/cache not used directly v6 (v6.1.0) node24

Every other pin was read at its ref and is already node24, so none of them changes:

Action Pin Runtime Used in
actions/checkout v7 node24 all four workflows
actions/setup-python v7 node24 tests.yml, ci.yml, docs.yml, update-snapshots.yml
actions/setup-node v7 node24 ci.yml, docs.yml, update-snapshots.yml
actions/upload-artifact v7 node24 ci.yml, update-snapshots.yml
actions/download-artifact v8 node24 ci.yml
actions/upload-pages-artifact v5 composite, nests upload-artifact v7.0.0 (node24) docs.yml
actions/deploy-pages v5 node24 docs.yml
actions/github-script v9 node24 update-snapshots.yml
codecov/codecov-action v7.0.0 composite, nests github-script v8.0.0 (node24) tests.yml
pypa/gh-action-pypi-publish v1.14.2 composite, nests setup-python v6.2.0 (node24) plus a Docker step tests.yml
daun/playwright-report-summary v4 node24 ci.yml
nwtgck/actions-netlify v4.0 node24 ci.yml

Every node-version in the workflows and .nvmrc is already 24. The repository already has a weekly github-actions Dependabot config, so none is added.

What this PR's CI proves

The only changed workflow is tests.yml, and its pre-commit job runs on this PR, so the change is proven here. Nothing is proven only after merge: the merge push to main repeats the same job, and it will be the first run to save a main-scoped pre-commit cache (this PR's run saves one scoped to its own ref). The publish job in the same file is unchanged and runs only on version tags.

🤖 Generated with Claude Code

Replace pre-commit/[email protected] with its own steps run directly. The
action is a composite that nests actions/cache@v4 (node20), and its
maintainer has said there will be no Node 24 release. The new steps
keep the action's behaviour: pip install pre-commit and log the freeze,
cache ~/.cache/pre-commit with the action's key (Python location, which
carries the full interpreter version, plus the hash of
.pre-commit-config.yaml), then pre-commit run --show-diff-on-failure
--color=always --all-files, whose exit status fails the job as before.

The cache step uses actions/cache@v6 (runs.using: node24). Every other
pin in this repository is already on a node24 major.

Co-Authored-By: Claude Opus 5 (1M context) <[email protected]>
Copilot AI lite review requested due to automatic review settings September 18, 2026 07:24
@github-actions

Copy link
Copy Markdown
Contributor

@github-actions
github-actions Bot temporarily deployed to pull request September 18, 2026 07:25 Inactive
@codecov

codecov Bot commented Sep 18, 2026

Copy link
Copy Markdown

Codecov Report

✅ All modified and coverable lines are covered by tests.
⚠️ Please upload report for BASE (main@649cc37). Learn more about missing BASE report.

Additional details and impacted files
@@           Coverage Diff           @@
##             main     #441   +/-   ##
=======================================
  Coverage        ?   56.30%           
=======================================
  Files           ?        2           
  Lines           ?      547           
  Branches        ?        0           
=======================================
  Hits            ?      308           
  Misses          ?      239           
  Partials        ?        0           
Flag Coverage Δ
pytests 56.30% <ø> (?)

Flags with carried forward coverage won't be shown. Click here to find out more.

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

Copilot AI left a comment

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

🟢 Approval recommended

The workflow change faithfully reproduces pre-commit/[email protected]’s steps (including the cache key) while moving caching to actions/cache@v6 (node24).

Pull request overview

Updates CI to remove the last Node 20–based GitHub Action usage by inlining pre-commit/[email protected]’s composite steps and switching the cache step to actions/cache@v6 (Node 24), keeping behavior consistent with the previous workflow.

Changes:

  • Replace pre-commit/[email protected] with equivalent explicit steps (install, freeze for logging, run).
  • Add actions/cache@v6 for ~/.cache/pre-commit using the same cache key as the removed action.
File summaries
File Description
.github/workflows/tests.yml Inlines pre-commit composite action behavior and uses Node 24 actions/cache@v6 to eliminate Node 20 action usage in the workflow.
Review details
  • Files reviewed: 1/1 changed files
  • Comments generated: 0
  • Review effort level: Lite

💡 Add a code-review agent skill or configure MCP servers for context-aware, tailored reviews. Learn more in the docs.

@github-actions

Copy link
Copy Markdown
Contributor

🎭 Visual Regression Test Results

passed  103 passed
skipped  3 skipped

Details

stats  106 tests across 1 suite
duration  3 minutes, 34 seconds
commit  0148520

Skipped tests

desktop-chrome › theme.spec.ts › Visual Regression Tests › prob-matrix - full page screenshot
mobile-chrome › theme.spec.ts › Visual Regression Tests › prob-matrix - full page screenshot
mobile-chrome › theme.spec.ts › Theme Features › f-string interpolation styling

@mmcky
mmcky merged commit e45f676 into main Sep 18, 2026
13 checks passed
@mmcky
mmcky deleted the maint/node24-actions branch September 18, 2026 11:26

This branch was previously deployed

1 inactive deployment
pull request — 0148520c Deployed Sep 18, 2026 by github-actions[bot]
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants