Skip to content

Commit

Permalink
Update commands
Browse files Browse the repository at this point in the history
  • Loading branch information
cYKatherine committed Dec 19, 2024
1 parent 64b9fd0 commit 556ff3f
Showing 1 changed file with 8 additions and 0 deletions.
8 changes: 8 additions & 0 deletions .github/workflows/shared-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -41,10 +41,18 @@ jobs:
working-directory: ${{ inputs.working_dir }}
run: |
tests_run=$(mvn -B clean compile test | tee build.log | grep "Tests run" | awk '{print $3}')
echo "DEBUG: tests_run = $tests_run" # Print the value of tests_run
if [ -z "$tests_run" ]; then # Check if tests_run is empty
echo "WARNING: Could not determine the number of tests run."
tests_run=0 # Set a default value
fi
if [ "$tests_run" -eq 0 ]; then
echo "ERROR: No tests were run!"
exit 1
fi
echo "INFO: $tests_run tests were run!"
- name: Generate code coverage
Expand Down

0 comments on commit 556ff3f

Please sign in to comment.