Skip to content
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
# Nextest configuration
# https://nexte.st/docs/configuration/

[profile.default]
# Terminate a test if it runs longer than 60s, warning at 30s.
slow-timeout = { period = "30s", terminate-after = 2 }
# Show output for failing tests immediately.
failure-output = "immediate"
final-status-level = "flaky"

[profile.ci]
# Don't stop at the first failure — surface everything in one run.
fail-fast = false
# Retry flaky tests a couple of times before marking them failed.
retries = 2
# Emit JUnit XML for CI test reporting.
[profile.ci.junit]
path = "junit.xml"
29 changes: 26 additions & 3 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,6 @@
permissions:
contents: read
checks: write

name: Build
"on":
Expand Down Expand Up @@ -51,6 +52,9 @@ jobs:
- name: Install Rust toolchain
uses: dtolnay/rust-toolchain@stable

- name: Install cargo-nextest
uses: taiki-e/install-action@nextest

- name: Setup cache
uses: Swatinem/rust-cache@v2

Expand All @@ -64,10 +68,29 @@ jobs:
run: cargo build --verbose --all-features

- name: Run tests (no features)
run: cargo test --verbose --no-default-features
run: cargo nextest run --profile ci --no-default-features

- name: Run tests (default features)
run: cargo test --verbose
run: cargo nextest run --profile ci

- name: Run tests (all features)
run: cargo test --verbose --all-features
run: cargo nextest run --profile ci --all-features

- name: Run doctests (all features)
run: cargo test --doc --all-features

- name: Upload test results
if: always()
Comment thread
mhovd marked this conversation as resolved.
uses: actions/upload-artifact@v4
with:
name: "junit-${{ matrix.os }}"
path: target/nextest/ci/junit.xml
if-no-files-found: ignore

- name: Publish test report
if: always()
Comment thread
mhovd marked this conversation as resolved.
uses: mikepenz/action-junit-report@v5
with:
report_paths: target/nextest/ci/junit.xml
check_name: "Test report (${{ matrix.os }})"
include_passed: false
Loading