Skip to content

Commit

Permalink
Refactor coverage.yml to update coverage check command
Browse files Browse the repository at this point in the history
  • Loading branch information
thadeucbr committed Sep 30, 2024
1 parent 73bf2cd commit 4a5d08b
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 1 deletion.
2 changes: 1 addition & 1 deletion .github/workflows/coverage.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:

- name: Check coverage
run: |
coverage=$(npm run coverage -- --reporter=text | grep -o '[0-9]*\.[0-9]*' | head -n 1)
coverage=$(npm run coverage -- --reporter=default | grep -o '[0-9]*\.[0-9]*' | head -n 1)
if (( $(echo "$coverage < 80" | bc -l) )); then
echo "Coverage is below 80%! Current coverage: $coverage%"
exit 1
Expand Down
1 change: 1 addition & 0 deletions vitest.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,7 @@ export default defineConfig({
],
silent: false,
coverage: {
reporter: ['text', 'lcov'],
all: true,
exclude: [
'node_modules',
Expand Down

0 comments on commit 4a5d08b

Please sign in to comment.