ci: improve workflows - #1381
Conversation
📝 WalkthroughWalkthroughGitHub Actions workflows now coordinate concurrent runs, install Corepack before enabling it, disable checkout credential persistence in selected jobs, and use Estimated code review effort: 3 (Moderate) | ~20 minutes 🚥 Pre-merge checks | ✅ 5✅ Passed checks (5 passed)
✨ Finishing Touches🧪 Generate unit tests (beta)
Thanks for using CodeRabbit! It's free for OSS, and your support helps us grow. If you like it, consider giving us a shout-out. Comment |
commit: |
…ll request number
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #1381 +/- ##
=======================================
Coverage ? 46.41%
=======================================
Files ? 52
Lines ? 1717
Branches ? 499
=======================================
Hits ? 797
Misses ? 738
Partials ? 182 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
There was a problem hiding this comment.
🧹 Nitpick comments (1)
.github/workflows/ci.yml (1)
22-22: 🔒 Security & Privacy | 🔵 Trivial | ⚡ Quick winPin the Corepack bootstrap version across all workflows.
npm i -g --force corepackinstalls an unpinned dependency beforesetup-nodeselects each job’s Node version. A future Corepack release or runner-image change can therefore alter or break CI bootstrap behavior. Pin a verified Corepack version, or use a pinned package-manager setup action, consistently at every site.Proposed fix
- - run: npm i -g --force corepack && corepack enable + - run: npm i -g --force corepack@<verified-version> && corepack enable🤖 Prompt for AI Agents
Verify each finding against current code. Fix only still-valid issues, skip the rest with a brief reason, keep changes minimal, and validate. In @.github/workflows/ci.yml at line 22, Pin the Corepack bootstrap version consistently at every listed site: .github/workflows/ci.yml lines 22-22, 54-54, and 105-105; .github/workflows/autofix.yml lines 18-18; .github/workflows/bench.yml lines 25-25; and .github/workflows/size.yml lines 29-29 and 71-71. Replace the unpinned global Corepack installation with the same verified pinned version or a pinned package-manager setup action across all workflows.
🤖 Prompt for all review comments with AI agents
Verify each finding against current code. Fix only still-valid issues, skip the
rest with a brief reason, keep changes minimal, and validate.
Nitpick comments:
In @.github/workflows/ci.yml:
- Line 22: Pin the Corepack bootstrap version consistently at every listed site:
.github/workflows/ci.yml lines 22-22, 54-54, and 105-105;
.github/workflows/autofix.yml lines 18-18; .github/workflows/bench.yml lines
25-25; and .github/workflows/size.yml lines 29-29 and 71-71. Replace the
unpinned global Corepack installation with the same verified pinned version or a
pinned package-manager setup action across all workflows.
ℹ️ Review info
⚙️ Run configuration
Configuration used: Organization UI
Review profile: CHILL
Plan: Pro Plus
Run ID: 5e3788d6-a583-4891-a505-cefe1cdaee46
📒 Files selected for processing (6)
.github/workflows/autofix.yml.github/workflows/bench.yml.github/workflows/ci.yml.github/workflows/provenance.yml.github/workflows/release.yml.github/workflows/size.yml
💤 Files with no reviewable changes (1)
- .github/workflows/provenance.yml
🚧 Files skipped from review as they are similar to previous changes (1)
- .github/workflows/release.yml
🔗 Linked issue
📚 Description
ubuntu-slimrunnerUse it for
agent-scan.yml,provenance.yml, andsize-comment.yml— the lighter 1-vCPU runner reduces queue times and resource usage. Theci.ymllint job was also switched but moved back toubuntu-latestsinceknip/oxc-parserrequires more memory.Concurrency groups
Added to all PR-triggered workflows (
autofix.yml,bench.yml,ci.yml,size.yml) so runs for the same PR/branch queue sequentially.cancel-in-progresswas intentionally omitted — GitHub's event system can fire duplicatepull_requestevents for a single push, andcancel-in-progress: truecaused those duplicates to cancel the legitimate run after 1 second. Runs now queue instead.persist-credentials: falseSet on
actions/checkoutinci.yml,release.yml, andprovenance.yml— none of those jobs perform subsequent git operations.autofix.ymlis intentionally excluded sinceautofix-ci/actionpushes lint fixes.Pre-install corepack
Use
npm i -g --force corepack && corepack enableinstead of relying on the bundled version, which will be removed in Node 26. The--forceflag is needed because the npm global prefix on Windows may already contain ayarnshim.Remove unnecessary
fetch-depth: 0Drop from jobs that don't need git history (lint, autofix, provenance checks). Kept where needed (release with
changelogen, benchmarks with CodSpeed).parallelkeywordUse for independent steps —
setup-bun/setup-denoin thecimatrix job, and the two artifact uploads insize.yml.Consistent formatting
Add blank lines between all top-level keys and between all steps across every workflow.