ci: cache EVM fixture tests with turbo - #37
Merged
Conversation
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.
|
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. |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
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
mainis not re-run on a PR branch.actions/cacheis 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.dependsOnwas["^test"]— a package waited on its dependencies' tests rather than their builds. Now^build.inputstobuild/checkso unrelated changes stop busting them.Verification
Hash sensitivity was measured directly, not assumed:
packages/evm/README.mdREADME.mdpackages/evm/src/state.tspackages/evm/test/cli.tspackages/shared/src/bytes.ts(dep)...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
tsxcall — same command and working directory, but untested until it runs. Subsequent pushes that don't touch EVM source should be near-instant.