ci_: bring back cmd coverage (#6204)
* ci_: bring back cmd coverage * fix_: update jenkinsfile
This commit is contained in:
parent
1795620df0
commit
137698e022
|
@ -159,8 +159,7 @@ pipeline {
|
|||
]) {
|
||||
nix.shell('make test-unit V=1', pure: false)
|
||||
}
|
||||
sh "mv c.out test-coverage.out"
|
||||
archiveArtifacts('report_*.xml, test_*.log, test-coverage.out, test-coverage.html, coverage_merged.out')
|
||||
archiveArtifacts('report_*.xml, test_*.log, test-coverage.html')
|
||||
}
|
||||
}
|
||||
} }
|
||||
|
|
|
@ -137,22 +137,17 @@ fi
|
|||
|
||||
# Gather test coverage results
|
||||
merged_coverage_report="coverage_merged.out"
|
||||
final_coverage_report="c.out"
|
||||
coverage_reports=$(find . -iname "*.coverage.out")
|
||||
rm -f ${final_coverage_report} ${merged_coverage_report}
|
||||
rm -f ${merged_coverage_report}
|
||||
|
||||
echo -e "${GRN}Gathering test coverage results: ${RST} output: ${merged_coverage_report}, input: ${coverage_reports}"
|
||||
echo $coverage_reports | xargs go run ./cmd/test-coverage-utils/gocovmerge.go > ${merged_coverage_report}
|
||||
|
||||
# Filter out test coverage for packages in ./cmd
|
||||
echo -e "${GRN}Filtering test coverage packages:${RST} ./cmd"
|
||||
grep -v '^github.com/status-im/status-go/cmd/' ${merged_coverage_report} > ${final_coverage_report}
|
||||
|
||||
# Generate HTML coverage report
|
||||
convert_coverage_to_html ${final_coverage_report} "test-coverage.html"
|
||||
convert_coverage_to_html ${merged_coverage_report} "test-coverage.html"
|
||||
|
||||
if [[ $UNIT_TEST_REPORT_CODECOV == 'true' ]]; then
|
||||
report_to_codecov "report_*.xml" ${final_coverage_report} "unit"
|
||||
report_to_codecov "report_*.xml" ${merged_coverage_report} "unit"
|
||||
fi
|
||||
|
||||
# Generate report with test stats
|
||||
|
|
Loading…
Reference in New Issue