Skip to content

Commit

Permalink
ci: thorough testing
Browse files Browse the repository at this point in the history
  • Loading branch information
MichaelKreil committed Jan 23, 2025
1 parent ff4a72d commit 91a9f81
Show file tree
Hide file tree
Showing 2 changed files with 45 additions and 23 deletions.
39 changes: 23 additions & 16 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -50,32 +50,39 @@ jobs:
- name: Run check
run: cargo check --workspace --all-features --all-targets

- name: Run clippy
- name: Run clippy /
run: cargo clippy --workspace --all-features --all-targets -- -D warnings

- name: Run clippy versatiles
- name: Run clippy /versatiles
run: cd versatiles; cargo clippy --workspace --all-features --all-targets -- -D warnings

- name: Run clippy versatiles_container
- name: Run clippy /versatiles_container
run: cd versatiles_container; cargo clippy --workspace --all-features --all-targets -- -D warnings

- name: Run clippy versatiles_core
- name: Run clippy /versatiles_core
run: cd versatiles_core; cargo clippy --workspace --all-features --all-targets -- -D warnings

- name: Run clippy versatiles_derive
- name: Run clippy /versatiles_derive
run: cd versatiles_derive; cargo clippy --workspace --all-features --all-targets -- -D warnings

- name: Run clippy versatiles_geometry
- name: Run clippy /versatiles_geometry
run: cd versatiles_geometry; cargo clippy --workspace --all-features --all-targets -- -D warnings

- name: Run clippy versatiles_image
- name: Run clippy /versatiles_image
run: cd versatiles_image; cargo clippy --workspace --all-features --all-targets -- -D warnings

- name: Run clippy versatiles_pipeline
- name: Run clippy /versatiles_pipeline
run: cd versatiles_pipeline; cargo clippy --workspace --all-features --all-targets -- -D warnings

- name: Run test
- name: Run test /
run: cargo test --workspace
- name: Run test /versatiles
run: cd versatiles; cargo test
- name: Run test /versatiles_container
run: cd versatiles_container; cargo test
- name: Run test /versatiles_core
run: cd versatiles_core; cargo test
- name: Run test /versatiles_derive
run: cd versatiles_derive; cargo test
- name: Run test /versatiles_geometry
run: cd versatiles_geometry; cargo test
- name: Run test /versatiles_image
run: cd versatiles_image; cargo test
- name: Run test /versatiles_pipeline
run: cd versatiles_pipeline; cargo test

- name: Install Cargo Coverage
uses: taiki-e/install-action@cargo-llvm-cov
Expand Down
29 changes: 22 additions & 7 deletions helpers/check.sh
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ echo "cargo clippy:"

run_clippy() {
cd "${PROJECT_DIR}$1"
echo " - $1"
echo " $1"
result=$(cargo clippy --all-features --all-targets -- -D warnings 2>&1)
if [ $? -ne 0 ]; then
echo -e "$result\nERROR DURING: cargo clippy $1"
Expand All @@ -39,11 +39,26 @@ run_clippy /versatiles_image
run_clippy /versatiles_pipeline
cd $PROJECT_DIR

echo "cargo test binary"
result=$(cargo test --bins --all-features 2>&1)
if [ $? -ne 0 ]; then
echo -e "$result\nERROR DURING: cargo test bin"
exit 1
fi

echo "cargo test:"

run_test() {
cd "${PROJECT_DIR}$1"
echo " $1"
result=$(cargo test --all-features 2>&1)
if [ $? -ne 0 ]; then
echo -e "$result\nERROR DURING: cargo test $1"
exit 1
fi
}

run_test /
run_test /versatiles
run_test /versatiles_container
run_test /versatiles_core
run_test /versatiles_derive
run_test /versatiles_geometry
run_test /versatiles_image
run_test /versatiles_pipeline

exit 0

0 comments on commit 91a9f81

Please sign in to comment.