👷 Drop caches on push for build package flow#6973
Conversation
Disable the setup-node pnpm cache in the production packages build job when the workflow is triggered by a push event, so push flows always install dependencies fresh without relying on the cache.
|
@fast-check/ava
fast-check
@fast-check/jest
@fast-check/packaged
@fast-check/poisoning
@fast-check/vitest
@fast-check/worker
commit: |
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## main #6973 +/- ##
=======================================
Coverage 94.78% 94.78%
=======================================
Files 212 212
Lines 5832 5832
Branches 1536 1536
=======================================
Hits 5528 5528
Misses 296 296
Partials 8 8
Flags with carried forward coverage won't be shown. Click here to find out more. ☔ View full report in Codecov by Sentry. 🚀 New features to boost your workflow:
|
Description
Push-triggered runs of the Build Status workflow (pushes to
main,next-*_*_*,fix-v*) no longer reuse the pnpm cache when building production packages. Thesetup-nodestep in theproduction_packagesjob now disables itscacheinput on push events, so dependencies are installed fresh. Pull request runs are unchanged and still benefit from the pnpm cache.The production packages produced by push flows are the ones that may end up being published. Skipping the cache there removes any chance of a stale or partially-populated cache silently influencing the built artifacts, at the cost of one uncached
pnpm installper push build — an acceptable trade-off since publishable artifacts only flow through push events.The conditional is expressed inline as
cache: ${{ github.event_name == 'push' && '' || 'pnpm' }}.setup-nodetreats an emptycacheinput as "no cache" (itsif (cache)guard short-circuits), so this is equivalent to omitting the input on push runs while keeping'pnpm'everywhere else.Scope is intentionally narrow: only the
production_packagesjob is affected. The other jobs (format_lint,typecheck,test, …) keep using the cache so the rest of the matrix stays fast.Checklist
— Don't delete this checklist and make sure you do the following before opening the PR
pnpm run bumpor by following the instructions from the changeset bot🐛(vitest) Something...) when the change targets a package other thanfast-check