From b9675718ca8560dd6a4d2a1f844b072a4f16fcaa Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Be=C3=B1at=20Espi=C3=B1a?= Date: Sat, 24 Oct 2026 12:51:18 +0200 Subject: [PATCH] chore: read the Stryker caches on main every day GitHub evicts a cache nobody reads for 7 days, and a push to main only refreshes the incremental files of the packages it changed, so a pull request after a quiet week ran every mutant of the others cold: core found no cache on bounda-dev/bounda#202 and ran out of time. --- .github/workflows/stryker-cache.yml | 33 +++++++++++++++++++++++++++++ 1 file changed, 33 insertions(+) create mode 100644 .github/workflows/stryker-cache.yml diff --git a/.github/workflows/stryker-cache.yml b/.github/workflows/stryker-cache.yml new file mode 100644 index 00000000..6f896968 --- /dev/null +++ b/.github/workflows/stryker-cache.yml @@ -0,0 +1,33 @@ +name: Stryker caches + +# GitHub evicts a cache nobody has read for 7 days, and a pull request can only read the +# incremental Stryker files saved on main. A push to main refreshes only the packages it changed, +# so after a quiet week a pull request would run every mutant of the others cold. +# Restoring each one counts as a read; daily leaves room for a skipped or late scheduled run. +# Fails when main has no file for a package: the next mutation run of it on main writes one. + +on: + schedule: + - cron: "0 6 * * *" + workflow_dispatch: + +permissions: + contents: read + +jobs: + touch: + name: Read (${{ matrix.package }}) + runs-on: ubuntu-latest + timeout-minutes: 5 + strategy: + fail-fast: false + matrix: + # The packages the mutation job in ci.yml can run. + package: [core, sqlite, postgresql, cli, react-router, create-bounda, cloudflare] + steps: + - uses: actions/cache/restore@v4 + with: + path: packages/${{ matrix.package }}/.stryker-tmp/incremental.json + key: stryker-${{ matrix.package }}-${{ github.sha }} + restore-keys: stryker-${{ matrix.package }}- + fail-on-cache-miss: true