Skip to content

Commit df4394a

Browse files
authored
Update dart.yml
1 parent cde8efb commit df4394a

File tree

1 file changed

+15
-4
lines changed

1 file changed

+15
-4
lines changed

.github/workflows/dart.yml

Lines changed: 15 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -35,11 +35,22 @@ jobs:
3535
- name: Analyze project source
3636
run: dart analyze
3737

38-
# Your project will need to have tests in test/ and a dependency on
39-
# package:test for this step to succeed. Note that Flutter projects will
40-
# want to change this to 'flutter test'.
38+
# Run Dart tests and output them at directory `./coverage`:
4139
- name: Run tests
42-
run: dart test
40+
run: dart test --coverage=./coverage
41+
42+
# Activate package `coverage`
43+
- name: Activate package coverage
44+
run: dart pub global activate coverage
45+
46+
# Generate LCOV report
47+
- name: Generate LCOV report
48+
run: genhtml -o ./coverage/report ./coverage/lcov.info
49+
50+
# Format collected coverage to LCOV
51+
- name: Format collected coverage to LCOV
52+
run: dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage
53+
4354
# Run Codecov
4455
- name: Codecov
4556
uses: codecov/[email protected]

0 commit comments

Comments
 (0)