feat(ci): eliminate duplicate E2E tests and slim nextest archive - #1874
Merged
josecelano merged 4 commits intoJun 4, 2026
Conversation
Codecov Report✅ All modified and coverable lines are covered by tests. Additional details and impacted files@@ Coverage Diff @@
## develop #1874 +/- ##
===========================================
+ Coverage 77.81% 80.83% +3.02%
===========================================
Files 382 368 -14
Lines 28637 27580 -1057
Branches 28637 27580 -1057
===========================================
+ Hits 22284 22295 +11
+ Misses 6049 4983 -1066
+ Partials 304 302 -2 ☔ View full report in Codecov by Harness. 🚀 New features to boost your workflow:
|
Member
Author
… analysis - Remove `debug` target from container.yaml test matrix (saves ~40 min per CI run) - Replace docker-inspect step with four E2E test steps (e2e_tests_runner + qbittorrent sqlite3/mysql/postgresql) in container.yaml test job - Add `if:` skip condition to testing.yaml docker-e2e job so it does not run when container.yaml already covers the same trigger (PRs to develop/main, pushes to develop/main/releases/**) - Warm publish_development and publish_release caches from container-release scope to avoid redundant full rebuilds on the same commit - Add detailed comments to container.yaml explaining unit test environment (rust:slim-trixie vs distroless), cache flow, and skip rationale - Add ADR 20260603000000: keep unit tests inside the container build - Update ADR index with new ADR entry - Update issue torrust#1854 spec: add full analysis (T1–T14), implementation plan, acceptance criteria (AC1–AC15), and test binary landscape findings (T11–T14 with three concrete optimization opportunities) Closes part of torrust#1854 (T7–T10 done; T12–T14 tracked as follow-up).
…ackages T12: add --exclude torrust-tracker-client and --exclude torrust-tracker-contrib-bencode to all four cargo nextest archive calls (debug/release cook-warmup and debug/release archive) in Containerfile. T13: create packages/e2e-tools/ (torrust-tracker-e2e-tools) and move e2e_tests_runner, qbittorrent_e2e_runner, and profiling binaries out of src/bin/ via git mv; add --exclude torrust-tracker-e2e-tools to all four archive calls. T14a: create packages/persistence-benchmark/ (torrust-tracker-persistence-benchmark) and move persistence_benchmark_runner binary and full persistence_benchmark/ module tree out of tracker-core/src/bin/ via git mv; add --exclude torrust-tracker-persistence-benchmark to all four archive calls. T14b: move testcontainers from [dependencies] to [dev-dependencies] in packages/tracker-core/Cargo.toml so it is no longer linked into production binaries. Docs: add nextest-archive-analysis.md (binary landscape analysis for 47 compiled targets); mark T11-T14 DONE and check AC12-AC15 in ISSUE.md. Misc: add alloca, artefacts, bitcode, objcopy to project-words.txt. Closes tasks T12, T13, T14 of issue torrust#1854.
josecelano
marked this pull request as ready for review
June 4, 2026 07:11
josecelano
force-pushed
the
1854-container-test-gating
branch
from
June 4, 2026 07:13
5a9ed4a to
c47173f
Compare
There was a problem hiding this comment.
Pull request overview
This PR reduces duplicated CI work by moving the Docker E2E execution into container.yaml, gating testing.yaml’s docker-e2e job when the container workflow already provides equivalent coverage, and documenting the policy/analysis in an ADR and issue spec.
Changes:
- Consolidate E2E coverage: run the E2E runners in
container.yamlright after building the image, and skiptesting.yaml’sdocker-e2eon overlapping triggers. - Simplify the container test matrix by removing the unused
debugtarget and warming publish jobs’ BuildKit cache from thecontainer-releasescope. - Add ADR + issue-spec documentation capturing the rationale, environment differences, and follow-up optimization opportunities.
Reviewed changes
Copilot reviewed 13 out of 36 changed files in this pull request and generated 1 comment.
Show a summary per file
| File | Description |
|---|---|
.github/workflows/container.yaml |
Removes debug matrix target, adds toolchain/cache setup, runs E2E steps after docker build, and reuses container-release cache in publish jobs. |
.github/workflows/testing.yaml |
Adds an if: guard to skip docker-e2e when container.yaml already runs equivalent E2E coverage for the same trigger. |
docs/adrs/20260603000000_keep_unit_tests_inside_container_build.md |
New ADR documenting the decision to keep unit tests inside the container build and how E2E provides distroless runtime validation. |
docs/adrs/index.md |
Registers the new ADR in the ADR index table. |
docs/issues/open/1854-1840-workflow-performance-container-test-gating/ISSUE.md |
Expands analysis, plan, and acceptance criteria for the CI test-gating work and follow-ups. |
project-words.txt |
Adds new spellcheck allowlist entries used by the new/updated documentation. |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
…k extraction persistence_benchmark_runner was moved from packages/tracker-core/ to the new packages/persistence-benchmark/ package (T14a of issue torrust#1854). Update all three benchmark jobs (SQLite3, MySQL, PostgreSQL) to use -p torrust-tracker-persistence-benchmark instead of -p torrust-tracker-core. Also extend the path filter to include packages/persistence-benchmark/** so the workflow triggers on changes to the new package.
- Fix four 'cargo run --bin' invocations in container.yaml to include '-p torrust-tracker-e2e-tools' so Cargo resolves the binaries after they were extracted out of src/bin/ into the new e2e-tools package - Wrap the long e2e_tests_runner run step with a YAML '>-' multiline scalar to stay within the 200-char yamllint line-length limit - Remove duplicate 'bitcode' entry from project-words.txt and restore correct alphabetical order (binascii → binstall → bitcode) - Correct Containerfile comment about torrust-tracker-contrib-bencode: it IS a production dependency; the package is excluded from nextest archive to avoid compiling its own tests/bins, not because it is unused - Add packages/e2e-tools/README.md so Cargo.toml 'readme' field resolves
Member
Author
|
ACK 2d1ce24 |
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.

Closes #1854
Summary
Eliminates duplicated E2E test work between
container.yamlandtesting.yaml,removes the unused
debugCI matrix target, documents the test binarylandscape, and slims
cargo nextest archiveby extracting dev-only packages.Changes
.github/workflows/container.yamldebugfrom test matrix — onlyreleasebuilt in CI (saves ~40 min per trigger)docker image inspectstep with four E2E test steps run immediately afterdocker build:e2e_tests_runner+ qBittorrent E2E for sqlite3, mysql, postgresqlsetup-toolchain,cache, andfetchsteps socargo runcan invoke the E2E runnerspublish_developmentandpublish_releasecache fromcontainer-releasescope toavoid redundant full rebuilds on the same commit
rust:slim-trixie, notdistroless), cache flow, and docker-e2e skip rationale.github/workflows/testing.yamlif:skip condition todocker-e2ejob so it does not run whencontainer.yamlalreadycovers the same trigger (PRs targeting
develop/main; pushes todevelop/main/releases/**)docs/adrs/20260603000000_keep_unit_tests_inside_container_build.md(new)rust:slim-trixievsdistroless/cc-debian13),three-layer defence-in-depth strategy, and rejected alternative
docs/adrs/index.mddocs/issues/open/1854-1840-workflow-performance-container-test-gating/ISSUE.mddocs/issues/open/1854-1840-workflow-performance-container-test-gating/nextest-archive-analysis.md(new)cold-build timing, and resolved open questions
Containerfilecargo nextest archivecalls (debug/release cook-warmup + debug/release archive)now
--excludesix packages:workspace-coupling,torrust-tracker-torrent-repository-benchmarking,torrust-tracker-client,torrust-tracker-contrib-bencode,torrust-tracker-e2e-tools,torrust-tracker-persistence-benchmarkpackages/e2e-tools/(new)torrust-tracker-e2e-toolscrate extracted fromsrc/bin/e2e_tests_runner,profiling,qbittorrent_e2e_runnerpackages/persistence-benchmark/(new)torrust-tracker-persistence-benchmarkcrate extracted frompackages/tracker-core/src/bin/persistence_benchmark_runnerwith fullpersistence_benchmarkmodule treepackages/tracker-core/Cargo.tomltestcontainersmoved from[dependencies]to[dev-dependencies](only needed in tests)project-words.txtalloca,artefacts,bitcode,objcopyStatus
torrust-tracker-clientandtorrust-tracker-contrib-bencodeexcluded)torrust-tracker-e2e-toolsextracted and excluded)torrust-tracker-persistence-benchmarkextracted and excluded;testcontainersto dev-deps)