Skip to content

Commit

Permalink
feat: allow send_coverage_to_cc to use a file prefix
Browse files Browse the repository at this point in the history
  • Loading branch information
robinbourianes-kalisio committed Oct 21, 2024
1 parent 38fa094 commit f282e1d
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 2 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -13,6 +13,7 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
- helm bumped to `3.14.4`
- helmfile bumped to `0.167.1`
- `build_docs` now takes a fourth parameter, the version of node to use to build the docs
- `send_coverage_to_cc` now takes a second parameter, the prefix to add to files in coverage report

### Fixed

Expand Down
6 changes: 4 additions & 2 deletions kash.sh
Original file line number Diff line number Diff line change
Expand Up @@ -250,9 +250,11 @@ install_cc_test_reporter() {

# Sends test coverage to code climate
# Arg1: code climate identifier for authentication
# Arg2: prefix to use when using format-coverage (can be empty)
send_coverage_to_cc() {
local CC_TEST_REPORTER_ID=$1
~/.local/bin/cc-test-reporter format-coverage -t lcov coverage/lcov.info
local CC_PREFIX=${2:-}
~/.local/bin/cc-test-reporter format-coverage -t lcov --add-prefix "$CC_PREFIX" coverage/lcov.info
~/.local/bin/cc-test-reporter upload-coverage -r "$CC_TEST_REPORTER_ID"
}

Expand Down Expand Up @@ -1266,7 +1268,7 @@ run_app_tests() {
##

if [ "$CODE_COVERAGE" = true ]; then
send_coverage_to_cc "$CC_TEST_REPORTER_ID"
send_coverage_to_cc "$CC_TEST_REPORTER_ID" "api"
fi

popd
Expand Down

0 comments on commit f282e1d

Please sign in to comment.