Skip to content

Commit 3d87f6e

Browse files
authored
Do not hide test output in log file (#2100)
Putting the clippy output in a log file is somewhat convenient for local use. But if there's a failure in CI that's difficult to reproduce locally, it only makes things harder to debug. The actual problem must've been that clippy used to be installed in the GitHub Actions environment by default (but not anymore), so we didn't notice that it's not explicitly requested in our workflow.
1 parent 9eb4501 commit 3d87f6e

File tree

2 files changed

+2
-8
lines changed

2 files changed

+2
-8
lines changed

.github/workflows/tests.yml

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -85,6 +85,7 @@ jobs:
8585
uses: dtolnay/rust-toolchain@e97e2d8cc328f1b50210efc529dca0028893a2d9
8686
with:
8787
toolchain: stable
88+
components: clippy
8889

8990
- name: Setup compilation cache
9091
uses: Swatinem/rust-cache@98c8021b550208e191a6a3145459bfc9fb29c4c0 # v2.8.0

rust-tooling/ci-tests/tests/stubs_are_warning_free.rs

Lines changed: 1 addition & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -73,12 +73,5 @@ fn stubs_are_warning_free() {
7373
if !log.is_empty() {
7474
std::fs::write("clippy.log", &log).expect("should write clippy.log");
7575
}
76-
assert!(
77-
log.is_empty(),
78-
"
79-
╔═════════════════════════════════════════╗
80-
║ clippy found warnings, check clippy.log ║
81-
╚═════════════════════════════════════════╝
82-
"
83-
);
76+
assert!(log.is_empty(), "{log}");
8477
}

0 commit comments

Comments
 (0)