Skip to content

Commit 33a5bc7

Browse files
committed
build: color by whether full code coverage has been achieved
1 parent 3ac92a3 commit 33a5bc7

File tree

3 files changed

+2
-4
lines changed

3 files changed

+2
-4
lines changed

.github/workflows/scripts/run_tests_coverage

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,13 +136,13 @@ main() {
136136

137137
# For each package, extract coverage value from the respective coverage report:
138138
pkg=`echo $package | sed -E 's/^.*stdlib\///'`
139-
pkg_cov=`cat reports/coverage/lcov-report/$pkg/lib/index.html | grep "fraction" | grep -oP '\d+/\d+' | printf %s "$(cat)" | jq -R -s -c 'split("\n")'`
139+
pkg_cov=$(cat reports/coverage/lcov-report/$pkg/lib/index.html | grep "fraction" | grep -oP '\d+/\d+' | awk -F'/' '{if ($1<$2) print "$\\color{red}" $0 "$"; else print "$\\color{green}" $0 "$"}' | jq -R -s -c 'split("\n")')
140140
pkg_url="https://github.com/${github_repo}/tree/${github_ref}/${package}"
141141
pkg_link="<a href="$pkg_url">$pkg</a>"
142142
coverage="$coverage\n| $pkg_link $pkg_cov"
143143

144144
# Copy coverage report of the package to artifacts directory:
145-
cp -r reports/coverage/lcov-report/$pkg artifacts/
145+
mkdir -p "artifacts/${pkg}" && cp -r "reports/coverage/lcov-report/${pkg}"/* "artifacts/${pkg}/"
146146
done
147147

148148
# Format coverage as Markdown table row:

lib/node_modules/@stdlib/random/base/hypergeometric/lib/hin.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -35,7 +35,6 @@ var factorial = require( '@stdlib/math/base/special/factorial' );
3535
*
3636
* [@kachitvichyanukul:1985]: http://dx.doi.org/10.1080/00949658508810839
3737
*
38-
*
3938
* @private
4039
* @param {PRNG} rand - PRNG for uniformly distributed numbers
4140
* @param {NonNegativeInteger} n1 - number of successes in population

lib/node_modules/@stdlib/random/base/hypergeometric/lib/hypergeometric.js

Lines changed: 0 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,6 @@ var hin = require( './hin.js' );
3434
*
3535
* [@kachitvichyanukul:1985]: http://dx.doi.org/10.1080/00949658508810839
3636
*
37-
*
3837
* @private
3938
* @param {PRNG} rand - PRNG for uniformly distributed numbers
4039
* @param {NonNegativeInteger} N - population size

0 commit comments

Comments
 (0)