Skip to content
Open
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
17 changes: 17 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,17 @@
[profile.default]

# To deal with the flaky integration tests, we set a retry policy.
# but if a test fails more than 3 times, it's safe to assume it's failing deterministically
# and that's a reliable indication that we shouldn't merge this PR
retries = { backoff = "fixed", count = 3, delay = "2s" }

# only run one test at a time, which allows a human-friendly experience for inspecting logs
test-threads = 1

# label as slow if a test runs for more than 60s
# kill it after 120s
slow-timeout = { period = "60s", terminate-after = 2 }

# display status for all levels (pass, fail, flaky, slow, etc)
status-level = "all"
final-status-level = "all"
39 changes: 39 additions & 0 deletions .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,39 @@
name: Coverage

on:
push:
branches:
- main

jobs:
coverage:
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v4

- name: Cache Rust dependencies
uses: actions/cache@v4
with:
path: ~/.cargo/registry, ~/.cargo/git
key: ${{ runner.os }}-cargo-${{ hashFiles('**/Cargo.lock') }}
restore-keys: |
${{ runner.os }}-cargo-

- name: Set up Rust
uses: actions-rust-lang/setup-rust-toolchain@v1
with:
rust-version: stable

- name: Install cargo-tarpaulin
run: cargo install cargo-tarpaulin

- name: Run coverage with cargo-tarpaulin
run: cargo tarpaulin --out Xml

- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v5
with:
file: ./target/debug/deps/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
if: success()
20 changes: 5 additions & 15 deletions .github/workflows/rust-test.yml
Original file line number Diff line number Diff line change
Expand Up @@ -29,8 +29,12 @@ jobs:
with:
rust-version: stable

- name: Install cargo-nextest
run: cargo install cargo-nextest --locked


- name: Run tests on the root project
run: cargo test --workspace
run: cargo nextest run

- name: Run tests on example crates
run: |
Expand All @@ -40,17 +44,3 @@ jobs:
(cd $example && cargo test)
fi
done

- name: Install cargo-tarpaulin for coverage
run: cargo install cargo-tarpaulin

- name: Run coverage with cargo-tarpaulin
run: cargo tarpaulin --out Xml
if: success()

- name: Upload coverage results to Codecov
uses: codecov/codecov-action@v5
with:
file: ./target/debug/deps/coverage.xml
token: ${{ secrets.CODECOV_TOKEN }}
if: success()
Loading