Skip to content

Commit 9aae21e

Browse files
authored
ci(tests): auto retry flaky tests (#875)
Close #874
1 parent 8f04ab8 commit 9aae21e

File tree

2 files changed

+10
-1
lines changed

2 files changed

+10
-1
lines changed

.config/nextest.toml

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,3 @@
1+
[profile.default]
2+
# Enable automatic retries for flaky tests with exponential backoff.
3+
retries = { backoff = "exponential", count = 2, delay = "1s" }

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -66,8 +66,14 @@ jobs:
6666
- uses: taiki-e/install-action@v2
6767
with:
6868
tool: cargo-hack
69+
- uses: taiki-e/install-action@v2
70+
with:
71+
tool: cargo-nextest
6972
- name: Tests
70-
run: cargo hack test --feature-powerset --depth 2 --clean-per-run --partition ${{ matrix.partition }}
73+
run: cargo hack nextest run --feature-powerset --depth 2 --clean-per-run --partition ${{ matrix.partition }}
74+
- name: Doc tests
75+
if: matrix.toolchain == 'stable' && matrix.partition == '1/4'
76+
run: cargo test --doc --workspace --all-features
7177

7278
fmt:
7379
name: Rustfmt check

0 commit comments

Comments
 (0)