Skip to content

Commit ccd2827

Browse files
committed
Update nextest config
1 parent 1109aaf commit ccd2827

2 files changed

Lines changed: 33 additions & 7 deletions

File tree

.config/nextest.toml

Lines changed: 26 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,26 @@
1+
# Nextest configuration file
2+
# https://nexte.st/book/configuration
3+
4+
[profile.default]
5+
# Stop test run after 5 failures
6+
fail-fast = { max-fail = 5 }
7+
8+
# Test output settings
9+
success-output = "never"
10+
status-level = "pass"
11+
12+
# Retry settings
13+
retries = { backoff = "fixed", count = 0 }
14+
15+
# Timeout settings
16+
slow-timeout = { period = "60s", terminate-after = 2 }
17+
18+
[profile.ci]
19+
# CI-specific configuration (inherits from default)
20+
# More verbose output for debugging CI failures
21+
failure-output = "final"
22+
success-output = "never"
23+
status-level = "retry"
24+
25+
# Allow more retries in CI for flaky tests
26+
retries = { backoff = "exponential", count = 2, delay = "1s", max-delay = "10s" }

.github/workflows/tests.yml

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -31,17 +31,17 @@ jobs:
3131
run: cargo build --verbose
3232

3333
- name: Run unit tests
34-
run: cargo nextest run --bins --verbose
34+
run: cargo nextest run --profile ci --bins --verbose
3535

3636
- name: Run smoke tests
37-
run: cargo nextest run --test smoke_test --verbose
37+
run: cargo nextest run --profile ci --test smoke_test --verbose
3838

3939
- name: Run macOS integration tests (with sudo)
4040
run: |
4141
# The tests require root privileges for PF rules on macOS
4242
# GitHub Actions provides passwordless sudo on macOS runners
4343
# Use -E to preserve environment and full path to cargo and nextest
44-
sudo -E $(which cargo) nextest run --test macos_integration --verbose
44+
sudo -E $(which cargo) nextest run --profile ci --test macos_integration --verbose
4545
4646
test-linux:
4747
name: Linux Tests
@@ -68,10 +68,10 @@ jobs:
6868
run: cargo build --verbose
6969

7070
- name: Run unit tests
71-
run: cargo nextest run --bins --verbose
71+
run: cargo nextest run --profile ci --bins --verbose
7272

7373
- name: Run smoke tests
74-
run: cargo nextest run --test smoke_test --verbose
74+
run: cargo nextest run --profile ci --test smoke_test --verbose
7575

7676
- name: Debug TLS environment
7777
run: |
@@ -87,7 +87,7 @@ jobs:
8787
sudo ip netns list || true
8888
# Run the Linux-specific jail tests with root privileges
8989
# Use full path to cargo and nextest since sudo doesn't preserve PATH
90-
sudo -E $(which cargo) nextest run --test linux_integration --verbose
90+
sudo -E $(which cargo) nextest run --profile ci --test linux_integration --verbose
9191
9292
test-weak:
9393
name: Weak Mode Integration Tests (Linux)
@@ -111,7 +111,7 @@ jobs:
111111
run: cargo build --verbose
112112

113113
- name: Run weak mode integration tests
114-
run: cargo nextest run --test weak_integration --verbose
114+
run: cargo nextest run --profile ci --test weak_integration --verbose
115115

116116
clippy:
117117
name: Clippy (${{ matrix.os }})

0 commit comments

Comments
 (0)