Skip to content

Commit 1596bff

Browse files
committed
fix: resolve CI failures in cargo-nextest migration
- Serialize `dashd_sync` integration tests via nextest test-groups (nextest runs each test as a separate process concurrently, causing dashd resource contention and crashes) - Add `--no-tests=pass` to nextest commands so crates with zero tests (like `dash-fuzz`) don't fail - Output explicit JUnit file list instead of glob pattern to avoid Windows path expansion issues with codecov CLI
1 parent 53a3d7d commit 1596bff

3 files changed

Lines changed: 19 additions & 3 deletions

File tree

.config/nextest.toml

Lines changed: 9 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,14 @@
1+
[test-groups]
2+
dashd-integration = { max-threads = 1 }
3+
14
[profile.ci]
25
fail-fast = false
36

47
[profile.ci.junit]
58
path = "junit.xml"
9+
10+
# dashd integration tests each start their own dashd process;
11+
# running them concurrently causes resource contention and crashes.
12+
[[profile.ci.overrides]]
13+
filter = 'binary(dashd_sync)'
14+
test-group = 'dashd-integration'

.github/scripts/ci_config.py

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -135,12 +135,14 @@ def run_group_tests(args):
135135
"cargo", "llvm-cov", "nextest",
136136
"--no-report", "-p", crate, "--all-features",
137137
"--profile", "ci",
138+
"--no-tests=pass",
138139
]
139140
else:
140141
cmd = [
141142
"cargo", "nextest", "run",
142143
"-p", crate, "--all-features",
143144
"--profile", "ci",
145+
"--no-tests=pass",
144146
]
145147
result = subprocess.run(cmd)
146148

@@ -155,7 +157,12 @@ def run_group_tests(args):
155157
failed.append(crate)
156158
github_error(f"Test failed for {crate} on {args.os}")
157159

158-
github_output("junit_dir", str(junit_dir))
160+
junit_files = sorted(junit_dir.glob("junit-*.xml"))
161+
if junit_files:
162+
github_output(
163+
"junit_files",
164+
",".join(str(f).replace("\\", "/") for f in junit_files),
165+
)
159166

160167
if failed:
161168
print("\n" + "=" * 40)

.github/workflows/build-and-test.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -89,10 +89,10 @@ jobs:
8989
fail_ci_if_error: true
9090

9191
- name: Upload test results to Codecov
92-
if: ${{ !cancelled() }}
92+
if: ${{ !cancelled() && steps.tests.outputs.junit_files }}
9393
uses: codecov/test-results-action@v1
9494
with:
95-
files: target/test-results/junit-*.xml
95+
files: ${{ steps.tests.outputs.junit_files }}
9696
flags: ${{ matrix.group }}
9797
token: ${{ secrets.CODECOV_TOKEN }}
9898

0 commit comments

Comments
 (0)