Skip to content

Commit

Permalink
feat(code-coverage): Expand error detection
Browse files Browse the repository at this point in the history
  • Loading branch information
RasmusSkytte committed Feb 14, 2024
1 parent 1001936 commit e34100b
Showing 1 changed file with 17 additions and 0 deletions.
17 changes: 17 additions & 0 deletions .github/workflows/code-coverage.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -89,6 +89,12 @@ jobs:
# Throw errors on failures or warnings
grep -q "FAIL 0" $TESTTHAT_OUT || { echo "Test failures found"; exit 1; }
grep -q "WARN 0" $TESTTHAT_OUT || { echo "Test warnings found"; exit 1; }
# Throw error if error: are found
if grep -q "Error:" $TESTTHAT_OUT; then
echo "Error: found"
exit 1
fi
shell: bash

- name: Upload test results
Expand Down Expand Up @@ -169,6 +175,11 @@ jobs:
grep -q "FAIL 0" $TESTTHAT_OUT || { echo "Test failures found"; exit 1; }
grep -q "WARN 0" $TESTTHAT_OUT || { echo "Test warnings found"; exit 1; }
# Throw error if error: are found
if grep -q "Error:" $TESTTHAT_OUT; then
echo "Error: found"
exit 1
fi
shell: bash

- name: Upload test results
Expand Down Expand Up @@ -278,6 +289,12 @@ jobs:
# Throw errors on failures or warnings
grep -q "FAIL 0" $TESTTHAT_OUT || { echo "Test failures found"; exit 1; }
grep -q "WARN 0" $TESTTHAT_OUT || { echo "Test warnings found"; exit 1; }
# Throw error if error: are found
if grep -q "Error:" $TESTTHAT_OUT; then
echo "Error: found"
exit 1
fi
shell: bash

- name: Upload test results
Expand Down

0 comments on commit e34100b

Please sign in to comment.