@@ -20,7 +20,7 @@ description: Rust pre-merge testing and linting github iggy actions
2020
2121inputs :
2222 task :
23- description : " Task to run (check, check-msrv, fmt, clippy, sort, machete, doctest, verify-publish, test-1, test-2, test-3, miri)"
23+ description : " Task to run (check, check-msrv, fmt, clippy, sort, machete, doctest, verify-publish, test-1, test-2, test-3, test-storage-compat, miri)"
2424 required : true
2525 component :
2626 description : " Component name (for context)"
@@ -84,19 +84,22 @@ runs:
8484 # a subset of crates changed.
8585 # Safety: cargo check/clippy run on the full workspace separately, catching all
8686 # compilation errors. This only scopes test BUILD and EXECUTION.
87+ # test-storage-compat is excluded from the DAG and coverage setup below:
88+ # storage-compat.sh builds two explicit binaries and drives its own nextest
89+ # run, and reads none of the /tmp plan files or the llvm-cov environment.
8790 - name : Fetch base branch for DAG analysis
88- if : startsWith(inputs.task, 'test-')
91+ if : startsWith(inputs.task, 'test-') && inputs.task != 'test-storage-compat'
8992 run : git fetch origin master --depth=1 2>/dev/null || true
9093 shell : bash
9194
9295 - name : Install cargo-rail
93- if : startsWith(inputs.task, 'test-')
96+ if : startsWith(inputs.task, 'test-') && inputs.task != 'test-storage-compat'
9497 uses : taiki-e/install-action@v2
9598 with :
9699 tool : cargo-rail
97100
98101 - name : Compute affected crates (cargo-rail)
99- if : startsWith(inputs.task, 'test-')
102+ if : startsWith(inputs.task, 'test-') && inputs.task != 'test-storage-compat'
100103 run : |
101104 METADATA_JSON=$(cargo metadata --format-version 1 --no-deps 2>/dev/null || echo "{}")
102105 TOTAL_CRATES=$(echo "$METADATA_JSON" | jq '.workspace_members | length' 2>/dev/null || echo "?")
@@ -202,18 +205,25 @@ runs:
202205 shell : bash
203206
204207 - name : Install cargo-llvm-cov
205- if : startsWith(inputs.task, 'test-')
208+ if : startsWith(inputs.task, 'test-') && inputs.task != 'test-storage-compat'
206209 uses : taiki-e/install-action@v2
207210 with :
208211 tool : cargo-llvm-cov
209212
210213 - name : Build and test with coverage
211- if : startsWith(inputs.task, 'test-')
214+ # test-storage-compat drives its own nextest invocation from
215+ # scripts/ci/storage-compat.sh. Without this exclusion it would also run
216+ # here with an empty PARTITION_FLAG, i.e. a fourth *unpartitioned* copy
217+ # of the whole suite on top of test-1/2/3.
218+ if : startsWith(inputs.task, 'test-') && inputs.task != 'test-storage-compat'
212219 run : |
213220 # Parse partition index from task name (test-1 -> hash:1/3, test-2 -> hash:2/3, ...).
214221 # TEST_PARTITIONS must match the number of test-N tasks in
215222 # .github/config/components.yml. Cluster bootstrap makes each test
216223 # CPU-heavy, so partitions stay small.
224+ # The regex is numeric-only on purpose: non-numeric test-* tasks
225+ # (test-storage-compat) opt out of partitioning rather than producing
226+ # an out-of-range hash:N/3.
217227 TEST_PARTITIONS=3
218228 TASK="${{ inputs.task }}"
219229 PARTITION_FLAG=""
@@ -383,6 +393,17 @@ runs:
383393 ls -la codecov.json
384394 shell : bash
385395
396+ # On-disk format backwards compatibility. The script builds an iggy-server
397+ # from the master tip under the checked-out merge ref (origin/master off a
398+ # pull_request run) and one from HEAD, seeds a data directory with the
399+ # former and reads it back with the latter. It does its own shallow fetch
400+ # of the baseline commit and exits non-zero if it cannot resolve one, so
401+ # the default depth-1 checkout is sufficient here.
402+ - name : Storage format backwards compatibility
403+ if : inputs.task == 'test-storage-compat'
404+ run : ./scripts/ci/storage-compat.sh
405+ shell : bash
406+
386407 # Miri (UB detector) on the unsafe-heavy crates that don't pull tokio /
387408 # compio. Pinned nightly so MIRIFLAGS behavior is stable across CI runs;
388409 # bump the date quarterly. Tree-borrows is the future-default aliasing
0 commit comments