Skip to content

Commit 1e19c6b

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 d1ef1a4 commit 1e19c6b

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
@@ -156,12 +156,14 @@ def run_group_tests(args):
156156
"cargo", "llvm-cov", "nextest",
157157
"--no-report", "-p", crate, "--all-features",
158158
"--profile", "ci",
159+
"--no-tests=pass",
159160
]
160161
else:
161162
cmd = [
162163
"cargo", "nextest", "run",
163164
"-p", crate, "--all-features",
164165
"--profile", "ci",
166+
"--no-tests=pass",
165167
]
166168
result = subprocess.run(cmd)
167169

@@ -176,7 +178,12 @@ def run_group_tests(args):
176178
finally:
177179
github_group_end()
178180

179-
github_output("junit_dir", str(junit_dir))
181+
junit_files = sorted(junit_dir.glob("junit-*.xml"))
182+
if junit_files:
183+
github_output(
184+
"junit_files",
185+
",".join(str(f).replace("\\", "/") for f in junit_files),
186+
)
180187

181188
if failed:
182189
print("\n" + "=" * 40)

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

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -86,10 +86,10 @@ jobs:
8686
fail_ci_if_error: true
8787

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

0 commit comments

Comments
 (0)