Skip to content

Commit f9f0f4d

Browse files
committed
CI run clippy latest nightly without denying warnings
1 parent 840fc19 commit f9f0f4d

File tree

1 file changed

+13
-1
lines changed

1 file changed

+13
-1
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,23 +77,35 @@ jobs:
7777
- name: Install dependencies
7878
if: matrix.os == 'ubuntu-latest'
7979
run: sudo bash ./.github/workflows/install-deps.sh
80-
- name: Install Rust nightly (stable date version)
80+
- name: Install Rust nightly (latest and stable date version)
8181
id: install-rust
8282
run: |
8383
STABLE_DATE=$(cargo clippy --version | perl -ne 'print $& if /\b\d{4}-\d{2}-\d{2}\b/')
8484
echo "stable_date=$STABLE_DATE" >> $GITHUB_OUTPUT
8585
86+
rustup toolchain install nightly
87+
rustup component add clippy --toolchain nightly
8688
rustup toolchain install nightly-$STABLE_DATE
8789
rustup component add clippy --toolchain nightly-$STABLE_DATE
8890
8991
echo "Stable version: $(cargo clippy --version)"
92+
echo "Nightly version: $(cargo +nightly clippy --version)"
9093
echo "Near stable nightly version: $(cargo +nightly-$STABLE_DATE clippy --version)"
9194
- name: Restore cargo caches
9295
uses: Swatinem/rust-cache@v1
9396
- name: Run clippy
9497
run: cargo clippy --all-features --tests --examples -- -D warnings
9598
- name: Run clippy nightly-${{ steps.install-rust.outputs.stable_date }} for benches
9699
run: cargo +nightly-${{ steps.install-rust.outputs.stable_date }} clippy --all-features --benches -- -D warnings -A clippy::incompatible_msrv
100+
- name: Run clippy nightly-latest without denying warnings
101+
run: |
102+
cargo +nightly clippy --all-features --tests --examples
103+
104+
echo "## clippy nightly output" >> $GITHUB_STEP_SUMMARY
105+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
106+
# Run it again so there is no noise like "Compiling xxx" and "Checking xxx" in the output.
107+
CARGO_TERM_COLOR=never cargo +nightly clippy --all-features --tests --examples 2>> $GITHUB_STEP_SUMMARY
108+
echo "\`\`\`" >> $GITHUB_STEP_SUMMARY
97109
98110
check:
99111
strategy:

0 commit comments

Comments
 (0)