-
Notifications
You must be signed in to change notification settings - Fork 1.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
[BLD]: run Rust integration tests in CI #2787
Merged
Merged
Conversation
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Reviewer ChecklistPlease leverage this checklist to ensure your code review is thorough before approving Testing, Bugs, Errors, Logs, Documentation
System Compatibility
Quality
|
codetheweb
force-pushed
the
feat-run-rust-integration-tests-in-ci
branch
from
September 12, 2024 17:56
ecb6c39
to
c2bba1a
Compare
codetheweb
force-pushed
the
feat-run-rust-integration-tests-in-ci
branch
3 times, most recently
from
September 12, 2024 18:30
023ba87
to
fab9c1c
Compare
codetheweb
force-pushed
the
feat-run-rust-integration-tests-in-ci
branch
from
September 12, 2024 19:11
fab9c1c
to
170aeea
Compare
codetheweb
commented
Sep 12, 2024
HammadB
reviewed
Sep 12, 2024
HammadB
approved these changes
Sep 12, 2024
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.
Aa-choo. I have a package allergy.
Thanks.
🤧 |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.
Description of changes
Does what it says on the tin. This PR also introduces Nextest, a new test runner (usage during local dev is optional). Nextest is currently 33% faster (when running locally) and has a lot of cool features that we may want to use in the future. In this PR, it's used to segment tests between those that require Tilt and those that do not.
Alternatives
Marking tests with
#[ignore]
This is one option recommended by the Rust book. You annotate your expensive tests with
#[ignore]
and runcargo test -- --ignored
when you wish to execute them.This is simple, but feels very strange.
Using a Cargo feature flag/configuration flag
This was the prior approach and requires adding a
build.rs
file or updatingCargo.toml
for every subcrate that potentially needs access to Tilt. Additionally, the DX isn't quite as nice because tests that require Tilt aren't normally compiled--meaning that you often won't notice that your change breaks some of these tests until you inspect the CI run.Automatically managing Tilt
The Rust tests could automatically start Tilt for specific tests if necessary and keep the stack warm during tests. This seemed complex and potentially brittle.
Always run Tilt stack for all tests
We could just assume that the Tilt stack is available when running
cargo test
. This is super simple and imo the best alternative, but it's nice to be able to run the subset of tests not requiring Tilt separately. In CI this translates to faster feedback (starting Tilt is 5-7m) and locally translates to cheaper execution.Test plan
How are these changes tested?
Tested in CI.
Documentation Changes
Are all docstrings for user-facing APIs updated if required? Do we need to make documentation changes in the docs repository?
n/a