Skip to content

Commit

Permalink
Try fix exit on find
Browse files Browse the repository at this point in the history
  • Loading branch information
jgcrosta committed Mar 26, 2024
1 parent f832fdf commit b7ba074
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 7 deletions.
10 changes: 4 additions & 6 deletions .github/workflows/general-rust.yml
Original file line number Diff line number Diff line change
Expand Up @@ -36,8 +36,8 @@ jobs:
working-directory: detectors
run: cargo +nightly fmt -- --check -v

- name: Check Formatting in Test Cases
run: find test-cases -name Cargo.toml -execdir cargo +nightly fmt -- --check -v \;
- name: Format Code in Test Cases
run: find test-cases -name Cargo.toml -print0 | xargs -0 -I{} bash -c 'cd "$(dirname {})" && cargo +nightly fmt -- --check -v || exit 255'

clippy:
name: Lint with Clippy
Expand Down Expand Up @@ -71,7 +71,7 @@ jobs:
run: cargo clippy --all-targets --all-features -- -D warnings

- name: Lint Code in Test Cases
run: find test-cases -name Cargo.toml -execdir cargo clippy --all-targets --all-features -- -D warnings \;
run: find test-cases -name Cargo.toml -print0 | xargs -0 -I {} sh -c 'cd $(dirname {}) && cargo clippy --all-targets --all-features -- -D warnings || exit 255'

udeps:
name: Check Unused Dependencies
Expand Down Expand Up @@ -101,6 +101,4 @@ jobs:
run: cargo install cargo-udeps --force

- name: Check Unused Dependencies in Test Cases
run: |
set -e
find test-cases -name Cargo.toml -execdir bash -c 'cargo update && cargo +nightly udeps --all-targets || exit 255' \;
run: find test-cases -name Cargo.toml -print0 | xargs -0 -I{} bash -c 'cd "$(dirname {})" && cargo update && cargo +nightly udeps --all-targets || exit 255'
2 changes: 1 addition & 1 deletion .github/workflows/test-detectors.yml
Original file line number Diff line number Diff line change
Expand Up @@ -111,4 +111,4 @@ jobs:
working-directory: test-cases
run: |
cd ${{ matrix.detector }}
find . -name Cargo.toml -execdir cargo test \;
find . -name Cargo.toml -print0 | xargs -0 -I{} bash -c 'cd "$(dirname {})" && cargo test || exit 255'

0 comments on commit b7ba074

Please sign in to comment.