Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
27 changes: 27 additions & 0 deletions .github/.codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,27 @@
# To validate:
# cat codecov.yml | curl --data-binary @- https://codecov.io/validate

codecov:
notify:
require_ci_to_pass: yes

coverage:
precision: 2
round: down
range: "70...100"

status:
project:
default:
target: auto
threshold: 0%
informational: true
patch:
default:
enabled: no
if_not_found: success

comment:
layout: "reach, diff, files, flags"
behavior: default
require_changes: no
15 changes: 13 additions & 2 deletions .github/workflows/build.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -67,8 +67,19 @@ 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
working-directory: ${{ matrix.package }}