Skip to content

Commit

Permalink
feat: add coverage script
Browse files Browse the repository at this point in the history
  • Loading branch information
chimon2000 committed May 6, 2020
1 parent 7111798 commit 7574c3d
Showing 1 changed file with 13 additions and 0 deletions.
13 changes: 13 additions & 0 deletions code_coverage.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
#!/bin/bash
set -e

echo "Run tests and get coverage"
flutter test --coverage

echo "Remove coverage from untestable areas"
flutter pub run remove_from_coverage -f coverage/lcov.info -r '(models.*$)|((main|uikit|bootstrap|freezed|device_info|environment|.g).dart$)'

if hash lcov-summary 2>/dev/null; then
echo "Build coverage report for VS Code"
lcov-summary coverage/lcov.info
fi

0 comments on commit 7574c3d

Please sign in to comment.