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: Improve stability of cargo-udeps in GitHub actions #17

Merged
merged 2 commits into from
Jan 10, 2024
Merged
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
8 changes: 6 additions & 2 deletions .github/workflows/unused-deps.yml
Original file line number Diff line number Diff line change
Expand Up @@ -25,8 +25,12 @@ jobs:
# udeps requires nightly
- uses: dtolnay/rust-toolchain@nightly
- uses: taiki-e/install-action@cargo-udeps
- name: Check for unused dependencies
run: cargo udeps --lib --features "${{ inputs.repository }}"
# Normally running cargo-udeps requires use of a nightly compiler
# In order to have a more stable and less noisy experience, lets instead
# opt to use the stable toolchain specified via the 'rust-toolchain' file
# and instead enable nightly features via 'RUSTC_BOOTSTRAP'
- name: run cargo-udeps
run: RUSTC_BOOTSTRAP=1 cargo udeps --lib --features "${{ inputs.repository }}"
Copy link
Member

Choose a reason for hiding this comment

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

Shouldn't this be ${{ inputs.features }}?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Indeed!

- uses: JasonEtco/create-an-issue@v2
if: ${{ failure() }}
env:
Expand Down