Merge pull request 'either fail ? then check fail else pass' (#112) from format-check-rust-fix into main

Reviewed-on: #112
Reviewed-by: zach <zach@brohn.se>
This commit was merged in pull request #112.
This commit is contained in:
2026-05-29 23:24:49 +02:00
+13 -2
View File
@@ -38,7 +38,8 @@ jobs:
rustfmt \ rustfmt \
rust-clippy rust-clippy
- name: Format check - id: format-check
name: Format check
continue-on-error: true continue-on-error: true
run: | run: |
if [ -n "$(find . -name "Cargo.toml" -print -quit)" ]; then if [ -n "$(find . -name "Cargo.toml" -print -quit)" ]; then
@@ -56,7 +57,8 @@ jobs:
echo "No Rust project found" echo "No Rust project found"
fi fi
- name: Clippy - id: clippy
name: Clippy
run: | run: |
if [ -n "$(find . -name "Cargo.toml" -print -quit)" ]; then if [ -n "$(find . -name "Cargo.toml" -print -quit)" ]; then
status=0 status=0
@@ -72,3 +74,12 @@ jobs:
else else
echo "No Rust project found" echo "No Rust project found"
fi fi
- name: Check results
if: always()
run: |
if [ "${{ steps.format-check.outcome }}" = "failure" ] || [ "${{ steps.clippy.outcome }}" = "failure" ]; then
echo "One or more checks failed"
exit 1
fi
echo "All checks passed"