chore_: enable nightly codeclimate reports (#5127)

* chore_: enable nightly codeclimate reports
* fix_: report codeclimate before exiting
This commit is contained in:
Igor Sirotin 2024-05-08 21:57:50 +01:00 committed by GitHub
parent 5f4aab3121
commit 0dde5a3b17
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 10 additions and 10 deletions

View File

@ -32,7 +32,7 @@ pipeline {
)
booleanParam(
name: 'UNIT_TEST_REPORT_CODECLIMATE',
defaultValue: !isTestNightlyJob(),
defaultValue: true,
description: 'Should the job report test coverage to CodeClimate?'
)
}

View File

@ -120,6 +120,15 @@ for package in ${UNIT_TEST_PACKAGES}; do
wait # Wait for all background jobs to finish
done
# Gather test coverage results
echo "mode: atomic" > c.out
grep -h -v "^mode:" ./**/*.coverage.out >> c.out
rm -rf ./**/*.coverage.out
if [[ $UNIT_TEST_REPORT_CODECLIMATE == 'true' ]]; then
cc-test-reporter after-build --prefix=github.com/status-im/status-go
fi
shopt -s globstar nullglob # Enable recursive globbing
if [[ "${UNIT_TEST_COUNT}" -gt 1 ]]; then
for exit_code_file in "${GIT_ROOT}"/**/exit_code_*.txt; do
@ -131,12 +140,3 @@ if [[ "${UNIT_TEST_COUNT}" -gt 1 ]]; then
fi
done
fi
# Gather test coverage results
echo "mode: atomic" > c.out
grep -h -v "^mode:" ./**/*.coverage.out >> c.out
rm -rf ./**/*.coverage.out
if [[ $UNIT_TEST_REPORT_CODECLIMATE == 'true' ]]; then
cc-test-reporter after-build --prefix=github.com/status-im/status-go
fi