Skip to content

Commit

Permalink
Merge pull request #12719 from keymanapp/refactor/common/tc_tests
Browse files Browse the repository at this point in the history
refactor(common): output number of tests when running on TC
  • Loading branch information
ermshiperete authored Nov 28, 2024
2 parents badb23a + d151d09 commit c7773f9
Showing 1 changed file with 8 additions and 1 deletion.
9 changes: 8 additions & 1 deletion common/web/types/build.sh
Original file line number Diff line number Diff line change
Expand Up @@ -80,13 +80,20 @@ function do_configure() {
}

function do_test() {
local MOCHA_FLAGS=

if [[ "${TEAMCITY_GIT_PATH:-}" != "" ]]; then
# we're running in TeamCity
MOCHA_FLAGS="-reporter mocha-teamcity-reporter"
fi

eslint .
tsc --build test

readonly C8_THRESHOLD=60

# Excludes are defined in .c8rc.json
c8 -skip-full --reporter=lcov --reporter=text --lines $C8_THRESHOLD --statements $C8_THRESHOLD --branches $C8_THRESHOLD --functions $C8_THRESHOLD mocha "${builder_extra_params[@]}"
c8 -skip-full --reporter=lcov --reporter=text --lines $C8_THRESHOLD --statements $C8_THRESHOLD --branches $C8_THRESHOLD --functions $C8_THRESHOLD mocha ${MOCHA_FLAGS} "${builder_extra_params[@]}"
builder_echo warning "Coverage thresholds are currently $C8_THRESHOLD%, which is lower than ideal."
builder_echo warning "Please increase threshold in build.sh as test coverage improves."
}
Expand Down

0 comments on commit c7773f9

Please sign in to comment.