-
Notifications
You must be signed in to change notification settings - Fork 11.3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
ci: use nextest for running rust tests #2031
Changes from all commits
File filter
Filter by extension
Conversations
Jump to
Diff view
Diff view
There are no files selected for viewing
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" | ||
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. I think the latest advice is to use baptiste0928/cargo-installdue to its superior caching. There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. This is actually downloading pre-compiled binary so caching isn't even needed. |
||
- 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 | ||
There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Do we want to use the There was a problem hiding this comment. Choose a reason for hiding this commentThe reason will be displayed to describe this comment to others. Learn more. Even with everything moved to crates/ directory we'd still keep the repo root as the workspace root I'd think |
||
- 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 | ||
|
||
|
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I'm not sure what we would use this for?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
This generates a junit file that could be later used in order to analyze the test run to do things like open up issues for flaky tests, etc
It's unused now