Skip to content

Commit

Permalink
debug
Browse files Browse the repository at this point in the history
  • Loading branch information
cYKatherine committed Dec 19, 2024
1 parent 9a6623e commit fab528a
Showing 1 changed file with 14 additions and 12 deletions.
26 changes: 14 additions & 12 deletions .github/workflows/shared-build-and-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -42,22 +42,24 @@ jobs:
run: |
mvn -B clean compile test | tee build.log
# Extract the total number of tests run
tests_run=$(cat build.log | awk '/Tests run:/ {sum += $3} END {print sum}')
cat build.log
echo "DEBUG: tests_run = $tests_run"
# # Extract the total number of tests run
# tests_run=$(cat build.log | awk '/Tests run:/ {sum += $3} END {print sum}')
if [ -z "$tests_run" ]; then
echo "WARNING: Could not determine the number of tests run."
tests_run=0
fi
# echo "DEBUG: tests_run = $tests_run"
if [ "$tests_run" -eq 0 ]; then
echo "ERROR: No tests were run!"
exit 1
fi
# if [ -z "$tests_run" ]; then
# echo "WARNING: Could not determine the number of tests run."
# tests_run=0
# fi
echo "INFO: $tests_run tests were run!"
# 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
if: ${{ inputs.vulnerability_scan_only == 'false' }}
Expand Down

0 comments on commit fab528a

Please sign in to comment.