chore_: enable nightly codeclimate reports (#5127)
* chore_: enable nightly codeclimate reports * fix_: report codeclimate before exiting
This commit is contained in:
parent
5f4aab3121
commit
0dde5a3b17
|
@ -32,7 +32,7 @@ pipeline {
|
|||
)
|
||||
booleanParam(
|
||||
name: 'UNIT_TEST_REPORT_CODECLIMATE',
|
||||
defaultValue: !isTestNightlyJob(),
|
||||
defaultValue: true,
|
||||
description: 'Should the job report test coverage to CodeClimate?'
|
||||
)
|
||||
}
|
||||
|
|
|
@ -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
|
Loading…
Reference in New Issue