CI: Run coverage builds for PRs, but only upload on master

This commit is contained in:
Tim Wojtulewicz 2024-05-21 14:15:35 -07:00
parent e8f504c0c0
commit 0cd023b839
2 changed files with 5 additions and 5 deletions

View file

@ -11,11 +11,6 @@ if [ "${CIRRUS_REPO_FULL_NAME}" != "zeek/zeek" ]; then
exit 0 exit 0
fi fi
if [ "${CIRRUS_BRANCH}" != "master" ]; then
echo "Coverage upload skipped for non-master branches"
exit 0
fi
cd testing/coverage cd testing/coverage
make coverage make coverage
make coveralls make coveralls

View file

@ -131,6 +131,11 @@ if [ $HTML_REPORT -eq 1 ]; then
echo -n "Creating HTML files... " echo -n "Creating HTML files... "
verify_run "genhtml --ignore-errors empty -o $COVERAGE_HTML_DIR $COVERAGE_FILE" verify_run "genhtml --ignore-errors empty -o $COVERAGE_HTML_DIR $COVERAGE_FILE"
else else
if [ "${CIRRUS_BRANCH}" != "master" ]; then
echo "Coverage upload skipped for non-master branches"
exit 0
fi
# The data we send to coveralls has a lot of duplicate files in it because of the # The data we send to coveralls has a lot of duplicate files in it because of the
# zeek symlink in the src directory. Run a script that cleans that up. # zeek symlink in the src directory. Run a script that cleans that up.
echo -n "Cleaning coverage data for Coveralls..." echo -n "Cleaning coverage data for Coveralls..."