-
Notifications
You must be signed in to change notification settings - Fork 1
fix: rust allow not invoking all-features in tests #95
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
Conversation
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.
Pull request overview
This PR adds a configurable all-features input parameter to control whether Rust compilation commands should use the --all-features flag. The intent is to provide flexibility in disabling all-features for binaries unless explicitly enabled.
- Adds
all-featuresboolean input parameter torust-base.ymlwith conditional flag insertion - Updates all cargo commands (nextest, clippy, doc, test) to conditionally include
--all-features - Configures
rust-library-base.ymlto explicitly enableall-features: truewhen callingrust-base.yml
Reviewed changes
Copilot reviewed 2 out of 2 changed files in this pull request and generated 3 comments.
| File | Description |
|---|---|
.github/workflows/rust-library-base.yml |
Adds all-features: true parameter when calling rust-base workflow |
.github/workflows/rust-base.yml |
Defines new all-features input parameter and conditionally applies --all-features flag to all cargo commands; includes trailing whitespace cleanup |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
|
behavior is unchanged unless you specifically set it to false |
| CARGO_BUILD_JOBS: ${{ inputs.cargo-build-jobs }} | ||
| run: | | ||
| cargo nextest run --all-features --workspace --locked --cargo-profile ${{ inputs.rust-profile }} --no-tests=warn | ||
| cargo nextest run ${{ inputs.test-all-features && '--all-features' || '' }} --workspace --locked --cargo-profile ${{ inputs.rust-profile }} --no-tests=warn |
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 is a cute way to do this

Add a feature to invoke/not-invoke all-features during tests. This allows (e.g.) binaries to disable all-feature testing, which is a common desire in integration tests
claude wrote this