Repository navigation
ci: move GitHub Actions to their Node 24 majors - #441
Conversation
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]>
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #441 +/- ##
=======================================
Coverage ? 56.30%
=======================================
Files ? 2
Lines ? 547
Branches ? 0
=======================================
Hits ? 308
Misses ? 239
Partials ? 0
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🟢 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@v6for~/.cache/pre-commitusing 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.
🎭 Visual Regression Test ResultsDetails
Skipped testsdesktop-chrome › theme.spec.ts › Visual Regression Tests › prob-matrix - full page screenshot |
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-commitjob intests.yml, which no longer usespre-commit/[email protected]. That action is a composite that nestsactions/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, thenpython -m pip freeze --localfor the log. This uses the Python 3.13 thatactions/setup-python@v7already sets up in the job.actions/cache@v6on~/.cache/pre-commit, with the action's own key:pre-commit-3|${{ env.pythonLocation }}|${{ hashFiles('.pre-commit-config.yaml') }}.pythonLocationcarries 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/cacheis 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
Every other pin was read at its ref and is already node24, so none of them changes:
Every
node-versionin the workflows and.nvmrcis 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 itspre-commitjob runs on this PR, so the change is proven here. Nothing is proven only after merge: the merge push tomainrepeats the same job, and it will be the first run to save amain-scoped pre-commit cache (this PR's run saves one scoped to its own ref). Thepublishjob in the same file is unchanged and runs only on version tags.🤖 Generated with Claude Code