Skip to content

Commit f282e1d

Browse files
feat: allow send_coverage_to_cc to use a file prefix
1 parent 38fa094 commit f282e1d

File tree

2 files changed

+5
-2
lines changed

2 files changed

+5
-2
lines changed

CHANGELOG.md

+1
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1313
- helm bumped to `3.14.4`
1414
- helmfile bumped to `0.167.1`
1515
- `build_docs` now takes a fourth parameter, the version of node to use to build the docs
16+
- `send_coverage_to_cc` now takes a second parameter, the prefix to add to files in coverage report
1617

1718
### Fixed
1819

kash.sh

+4-2
Original file line numberDiff line numberDiff line change
@@ -250,9 +250,11 @@ install_cc_test_reporter() {
250250

251251
# Sends test coverage to code climate
252252
# Arg1: code climate identifier for authentication
253+
# Arg2: prefix to use when using format-coverage (can be empty)
253254
send_coverage_to_cc() {
254255
local CC_TEST_REPORTER_ID=$1
255-
~/.local/bin/cc-test-reporter format-coverage -t lcov coverage/lcov.info
256+
local CC_PREFIX=${2:-}
257+
~/.local/bin/cc-test-reporter format-coverage -t lcov --add-prefix "$CC_PREFIX" coverage/lcov.info
256258
~/.local/bin/cc-test-reporter upload-coverage -r "$CC_TEST_REPORTER_ID"
257259
}
258260

@@ -1266,7 +1268,7 @@ run_app_tests() {
12661268
##
12671269

12681270
if [ "$CODE_COVERAGE" = true ]; then
1269-
send_coverage_to_cc "$CC_TEST_REPORTER_ID"
1271+
send_coverage_to_cc "$CC_TEST_REPORTER_ID" "api"
12701272
fi
12711273

12721274
popd

0 commit comments

Comments
 (0)