ci(pr): run tests across feature sets, not just default#26
ci(pr): run tests across feature sets, not just default#26bdimitrov-netzine wants to merge 2 commits into
Conversation
The PR `tests` job ran `cargo test` with default features only, while the
feature-build matrix merely compiled the non-default feature sets. As a
result, tests (and code branches) gated behind non-default features were
compiled but never executed anywhere in CI.
Convert the single `tests` job into a matrix:
* default - full workspace, default features (unchanged)
* dev-single-node-setup - re-runs the types/primary/orchestrator crates whose
single-authority committee, sole-member consensus, and epoch-transition-mode
unit tests are gated behind this feature.
* archive-replay - evm-crate-local feature not reachable from the
rayls-network bin (so the feature-build matrix can't cover it); compile-checks
the alternate reth_env/chainspec/block-execution paths and re-runs the evm
suite through the feature-gated test_utils branches.
Each leg uses its own rust-cache shared-key so their feature-divergent target
dirs don't clobber one another, and fail-fast is disabled so one failing
feature set doesn't mask the others.
|
Claude finished @bdimitrov-netzine's task in 1m 45s —— View job PR Review
This is a well-motivated, clean change that closes a genuine gap: feature-gated tests were being compiled by Security / pattern:
|
Security Scan - CodeSeverity: HIGH, CRITICAL No vulnerabilities found View scan results |
The matrix renamed the test job to 'Tests (${{ matrix.name }})', so its
check contexts are 'Tests (default)', 'Tests (dev-single-node-setup)', etc.
Branch protection requires a context named exactly 'Tests', which would then
never report and would block every PR merge.
Add a lightweight 'tests-gate' job displayed as 'Tests' that needs the matrix
and fails unless every leg succeeded, restoring the required check without
having to enumerate each leg in protection settings.
|
Claude finished @bdimitrov-netzine's task in 1m 46s —— View job PR Review
This PR closes a real gap — feature-gated tests were compiled by
|
Problem
The PR `tests` job ran `cargo test` with default features only, while `feature-build-matrix.yml` merely compiled the non-default feature sets. Tests (and alternate code branches) gated behind non-default features were therefore compiled but never executed anywhere in CI.
Change
Convert the single `tests` job into a matrix:
Newly-executed gated tests: `committee_allows_single_authority`, `single_validator_commits_a_subdag`, `test_decide_node_mode_sole_member_without_override_returns_inactive`, `test_decide_node_mode_observer_sole_member_stays_observer`.
Notes