only fail on a coverage diff for PR builds, not commit builds (#16901)

This commit is contained in:
Kyle Altendorf 2023-11-21 11:59:01 -05:00 committed by GitHub
parent ceba39c672
commit 5ec2deedba
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -196,7 +196,7 @@ jobs:
diff-cover --compare-branch=${{ env.compare-branch }} --fail-under=100 --html-report=coverage-reports/diff-cover.html --markdown-report=coverage-reports/diff-cover.md coverage-reports/coverage.xml | tee coverage-reports/diff-cover-stdout
COV_STATUS="${PIPESTATUS[0]}"
echo "COV_STATUS=$COV_STATUS" >> "$GITHUB_ENV"
if [[ $COV_STATUS != '0' ]]; then
if [[ $COV_STATUS != '0' && '$GITHUB_BASE_REF' != '' ]]; then
exit 1
fi