either fail ? then check fail else pass
This commit is contained in:
@@ -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"
|
||||||
|
|||||||
Reference in New Issue
Block a user