Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Setup Codecov #4

Open
ajusa opened this issue May 4, 2020 · 1 comment
Open

Setup Codecov #4

ajusa opened this issue May 4, 2020 · 1 comment

Comments

@ajusa
Copy link
Owner

ajusa commented May 4, 2020

Busted already supports creating coverage files, now set up a way to see coverage of tests visually.
Will reduce number of save related bugs too hopefully.

@ajusa
Copy link
Owner Author

ajusa commented Jun 17, 2020

COV=$(moon -c test2.moon 2>&1)
echo "$COV"
echo
readarray -t a < <(echo "$COV" | grep -P '^\*' | wc -l - test2.moon | head -n 2 | grep -Po '^\h+\d+')
L_COV=$((a[0]))
L_FILE=$((a[1]))
L_PERC=$(( L_COV * 100 / L_FILE ))
echo "Converage: ${L_PERC}% (${L_COV} out of ${L_FILE} lines)"

Something like this might help (credit: turbo from Moonscript Discord)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant