Skip to content
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

Merged
merged 1 commit into from
May 18, 2022
Merged

Conversation

bmwill
Copy link
Contributor

@bmwill bmwill commented May 18, 2022

No description provided.

Copy link
Collaborator

@gdanezis gdanezis left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Very good idea to use nextest indeed!

Copy link
Contributor

@huitseeker huitseeker left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Nice! I made a couple suggestions.

# - 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
Copy link
Contributor

Choose a reason for hiding this comment

The 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.

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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.

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
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Do we want to use the --config-file option here to make sure our custom config file is always taken into account? (w/o relying on default location that is, since it's relative to the workspace root .. imagine if we move everything to crates/)

Copy link
Contributor Author

Choose a reason for hiding this comment

The 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

Comment on lines +12 to +13
[profile.ci.junit]
path = "junit.xml"
Copy link
Contributor

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?

Copy link
Contributor Author

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

@bmwill bmwill merged commit a4f53b9 into MystenLabs:main May 18, 2022
@bmwill bmwill deleted the nextest branch May 18, 2022 15:34
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants