test(backend): run integration tests with nextest across parallel CI shards#13317
Draft
sbpublic wants to merge 3 commits into
Draft
test(backend): run integration tests with nextest across parallel CI shards#13317sbpublic wants to merge 3 commits into
sbpublic wants to merge 3 commits into
Conversation
…shards Replaces the sequential per-chunk workaround (#13273) with cargo-nextest. nextest runs each test in its own process, so every integration test gets a fresh PocketIC server and its memory is released on process exit — memory never accumulates, no chunking needed. The `tests` CI job now fans out into a 4-way matrix; each shard runs its slice via nextest's `--partition count:N/4`, cutting wall-clock. Explicit cargo args (e.g. the breaking-interface `-- --ignored candid`) and local runs keep the plain `cargo test` path. - dev-tools.json: add cargo-nextest (local `scripts/setup`); CI installs it via the official get.nexte.st script. Closes #13316 Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
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.
Motivation
Follow-up to #13273 (which fixed the backend
testsOOM by running theitsuite in sequential per-chunk processes) and @AntonioVentilii's review suggestion. Closes #13316.cargo-nextestruns each test in its own process, so every integration test gets a fresh PocketIC server and its memory is released on process exit — memory never accumulates across the suite, so the hand-rolled chunking is no longer needed. Its--partitionalso shards the suite across parallel CI jobs, cutting wall-clock.Changes
scripts/test.backend.sh: replaced therun_it_in_chunksbash workaround withcargo nextest run -p backend. On CI it passes--partition "$NEXTEST_PARTITION"(set by the matrix); explicit cargo args (e.g. the breaking-interface-- --ignored candid) and local runs keep the plaincargo testpath..github/workflows/backend-tests.yml: thetestsjob now fans out into a 4-waypartitionmatrix (fail-fast: false), installscargo-nextestvia the officialget.nexte.stscript, and setsNEXTEST_PARTITION=count:${matrix.partition}/4.dev-tools.json: addedcargo-nextest(cargo-binstall) for localscripts/setup.Tests
nextest listdiscovers all 191ittests, and--partition count:N/4splits them 48/48/48/47;shellcheck/shfmt/bash -nclean,dev-tools.jsonvalid JSON, workflow valid YAML.clang) — the chunked→nextest behaviour is validated by this PR's owntestsmatrix on CI.Notes
cargo-nextest) — flagging for sign-off per CLAUDE.md. It was the explicit suggestion in test(backend): run integration tests in chunks to bound PocketIC memory #13273's review and the scope of Backend integration tests: adopt cargo-nextest + parallel CI shards #13316.get.nexte.stscript (fast, nocargo-binstallbootstrap);dev-tools.jsoncovers local setup. Happy to unify on one path if preferred./4) is coupled to thepartition: [1, 2, 3, 4]list — both are commented; adjust together.🤖 Generated with Claude Code — model: Claude Opus 4.8 (claude-opus-4-8)