Skip to content

Commit

Permalink
ci: add coverage options to ci test
Browse files Browse the repository at this point in the history
  • Loading branch information
kosukesaigusa committed Jan 3, 2024
1 parent ad9f7f7 commit 916ac4a
Showing 1 changed file with 12 additions and 2 deletions.
14 changes: 12 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,18 @@ jobs:
- name: Run tests
run: |
if grep -q "name: example" "pubspec.yaml"; then
flutter test
flutter test --coverage
else
dart test
dart test --coverage=./coverage
dart run coverage:format_coverage --lcov --in=./coverage --out=./coverage/lcov.info --report-on=lib
fi
working-directory: ${{ matrix.package }}

- name: Upload coverage to Codecov
uses: codecov/codecov-action@v3
with:
token: ${{ secrets.CODECOV_TOKEN }}
files: ./coverage/lcov.info
fail_ci_if_error: true
flags: unittests
name: codecov-umbrella

0 comments on commit 916ac4a

Please sign in to comment.