Skip to content

Commit 59deea7

Browse files
committed
ci(coverage): serialise test threads + raise proptest cases for stable 100% gate
The --fail-under 100 tarpaulin gate was non-deterministic: the same commit measured 99.81% on CI vs 99.97% locally with disjoint uncovered-line sets. Root causes: (1) parallel test execution + LLVM coverage instrumentation give slightly different line attribution per run/machine; (2) proptest branch coverage is seed-random (proptest 1.x has no seed env var). Pin RUST_TEST_THREADS=1 for stable attribution and PROPTEST_CASES=1024 so property-test branches are hit every run. Deterministic source-level coverage of must-cover branches is handled by unit tests, not env.
1 parent bece900 commit 59deea7

1 file changed

Lines changed: 12 additions & 0 deletions

File tree

.github/workflows/CI.yml

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -603,6 +603,18 @@ jobs:
603603
- name: Install pg_query build deps (libclang + PG C toolchain)
604604
run: apt-get update && apt-get install -y clang libclang-dev build-essential libreadline-dev zlib1g-dev flex bison
605605
- name: Coverage
606+
# Determinism for the `--fail-under 100` gate: serialise test threads so
607+
# the covered-line set is stable across runs/machines (parallel test
608+
# execution + LLVM coverage instrumentation otherwise produce slightly
609+
# different line attribution). A higher proptest case count makes
610+
# property-test-only branches far more likely to be hit on every run.
611+
# NOTE: proptest 1.x has NO RNG-seed env var (its seed is random per
612+
# run), so true reproducibility of proptest branch coverage must be
613+
# enforced at the source level (deterministic unit tests for any branch
614+
# that must always be covered), not via env here.
615+
env:
616+
PROPTEST_CASES: "1024"
617+
RUST_TEST_THREADS: "1"
606618
run: |
607619
# rust coverage issue
608620
echo 'max_width = 100000' > .rustfmt.toml

0 commit comments

Comments
 (0)