Skip to content

Commit

Permalink
ci: use nextest for running rust tests (MystenLabs#2031)
Browse files Browse the repository at this point in the history
  • Loading branch information
bmwill authored May 18, 2022
1 parent 22c8012 commit a4f53b9
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 9 deletions.
13 changes: 13 additions & 0 deletions .config/nextest.toml
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
[profile.ci]
# Print out output for failing tests as soon as they fail, and also at the end
# of the run (for easy scrollability).
failure-output = "immediate-final"
# Show skipped tests in the CI output.
status-level = "skip"
# Do not cancel the test run on the first failure.
fail-fast = false
# Retry failing tests in order to not block builds on flaky tests
retries = 2

[profile.ci.junit]
path = "junit.xml"
14 changes: 5 additions & 9 deletions .github/workflows/rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -58,17 +58,13 @@ jobs:
steps:
- uses: actions/checkout@v3
- uses: actions-rs/toolchain@v1
# Disable caching on self-hosted jobs
# Enable caching of the 'librocksdb-sys' crate by additionally caching the
# 'librocksdb-sys' src directory which is managed by cargo
# - uses: bmwill/rust-cache@v1 # Fork of 'Swatinem/rust-cache' which allows caching additional paths
# with:
# path: ~/.cargo/registry/src/**/librocksdb-sys-*
- uses: taiki-e/install-action@nextest
- name: cargo test
run: |
cargo build --all-features --lib
cargo test --all-features --no-run # -j N # uncomment and set a low number if builds start OOMing again
cargo test --all-features
cargo nextest run --all-features --profile ci
- name: Doctests
run: |
cargo test --doc --all-features
# Ensure there are no uncommitted changes in the repo after running tests
- run: scripts/changed-files.sh

Expand Down

0 comments on commit a4f53b9

Please sign in to comment.