Skip to content

Commit 11c8bad

Browse files
authored
CI: Also show errors in rust-warnings.yml [ci skip]
At under a minute, this check runs faster than a lot of the other CI checks, so we might as well show errors from `cargo check` to serve as a smoke check in addition to surfacing warnings.
1 parent e409371 commit 11c8bad

File tree

1 file changed

+5
-5
lines changed

1 file changed

+5
-5
lines changed

.github/workflows/rust-warnings.yml

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -42,10 +42,10 @@ jobs:
4242
run: rustup default beta
4343

4444
- name: Rust warnings
45+
shell: bash
4546
run: |
46-
set -euo pipefail
47+
set -eu
4748
cargo check --quiet --all-features --message-format=json \
48-
| jq -r 'select(.reason == "compiler-message" and .message.level == "warning") | .message.rendered' \
49-
> warnings.txt
50-
cat warnings.txt
51-
! grep --quiet '[^[:space:]]' warnings.txt
49+
| jq -r 'select(.message.level == "warning" or .message.level == "error") | .message.rendered' \
50+
| tee messages.txt
51+
(exit "${PIPESTATUS[0]}") && ! grep --quiet '[^[:space:]]' messages.txt

0 commit comments

Comments
 (0)