Skip to content

ci: cache EVM fixture tests with turbo - #37

Merged
julia-script merged 1 commit into
mainfrom
julia/turbo-test-caching-ci-000f14
Aug 4, 2026
Merged

ci: cache EVM fixture tests with turbo#37
julia-script merged 1 commit into
mainfrom
julia/turbo-test-caching-ci-000f14

Conversation

@julia-script

Copy link
Copy Markdown
Owner

Problem

The EVM fixture suite (100k+ tests, including stress tests) ran on every push and took ~8 hours. It was invoked as a raw pnpm tsx ./test/cli.ts, bypassing turbo entirely — so despite the repo using turbo, nothing about these tests was ever cached.

Fix

Route the fixture tests through turbo as test:fixtures:state / test:fixtures:blockchain, with inputs scoped to source and the test harness.

The downloaded fixtures (several GB, gitignored) are explicitly excluded from the hash via !test/test-fixtures/** — otherwise re-downloading them would invalidate the cache every run.

Uses the Vercel remote cache, so a hash already verified on main is not re-run on a PR branch. actions/cache is kept as a local layer in front of it: a same-branch re-run skips the network round-trip, and if the remote is ever unreachable there is still local caching rather than an 8-hour run.

Also fixed

  • test.dependsOn was ["^test"] — a package waited on its dependencies' tests rather than their builds. Now ^build.
  • Added inputs to build / check so unrelated changes stop busting them.
  • Skip the multi-GB fixture download entirely when the cache already hits.
  • Collapsed the two near-identical jobs into a matrix.

Verification

Hash sensitivity was measured directly, not assumed:

Change Hash Expected
packages/evm/README.md unchanged
root README.md unchanged
fixtures present on disk unchanged
packages/evm/src/state.ts changed
packages/evm/test/cli.ts changed
packages/shared/src/bytes.ts (dep) changed

...and returned to baseline exactly once reverted.

Remote caching was isolated and confirmed: with the local cache wiped and a fresh hash, the task ran while unlinked; restoring only the link made the same hash a cache hit — so the artifact came from the remote.

Note

This PR is its own first real test. It's a cache miss by construction (the EVM-adjacent hash is new), so expect the full ~8h on both jobs here. That run is what confirms the suite still passes when invoked through turbo rather than the old direct tsx call — same command and working directory, but untested until it runs. Subsequent pushes that don't touch EVM source should be near-instant.

The fixture suite (100k+ tests, including stress tests) ran on every push
and took ~8 hours. It was invoked as a raw `tsx test/cli.ts`, bypassing
turbo entirely, so nothing was ever cached.

Route it through turbo as `test:fixtures:state` / `test:fixtures:blockchain`
and scope the task inputs to source and the test harness. The downloaded
fixtures are explicitly excluded from the hash, so re-downloading them
never invalidates the cache.

Also:
- Fix `test.dependsOn`, which was `^test` (waiting on dependencies' tests
  rather than their builds) and is now `^build`.
- Add `inputs` to build/check so unrelated file changes stop busting them.
- Skip the multi-GB fixture download when the cache already hits.
- Use the Vercel remote cache so a hash verified on main is not re-run on
  PR branches, and collapse the two near-identical jobs into a matrix.
@cursor

cursor Bot commented Aug 4, 2026

Copy link
Copy Markdown

Bugbot is not enabled for your account, so this pull request was not reviewed.

Enable Bugbot in the Cursor dashboard to get automatic reviews on future PRs.

@julia-script
julia-script merged commit 59f27c2 into main Aug 4, 2026
0 of 2 checks passed
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.

1 participant