Skip to content

Commit

Permalink
Merge pull request #136 from osociety/run-codecov-all
Browse files Browse the repository at this point in the history
Update lcov.info to coverage.lcov
  • Loading branch information
git-elliot authored Sep 2, 2023
2 parents fbd6ae0 + 1e2b92a commit d1647e8
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 5 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/dart.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,13 @@ jobs:
# package:test for this step to succeed. Note that Flutter projects will
# want to change this to 'flutter test'.
- name: Run tests
run: dart test --coverage="coverage"
run: dart test --coverage="./coverage"

- name: Install coverage tools
run: dart pub global activate coverage

- name: Format Coverage
run: dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage
run: dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/coverage.lcov -i ./coverage

- name: Upload Coverage to CodeCov
uses: codecov/codecov-action@v3
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/publish.yml
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@ jobs:
run: dart pub global activate coverage

- name: Format Coverage
run: $HOME/.pub-cache/bin/format_coverage --lcov --in=coverage --out=coverage/coverage.lcov --report-on=lib
run: dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/coverage.lcov -i ./coverage

- name: Setup Pub Credentials
shell: bash
Expand Down
4 changes: 2 additions & 2 deletions format_coverage.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,10 +5,10 @@ dart run test --coverage=./coverage
dart pub global activate coverage

## Format collected coverage to LCOV (only for directory "lib")
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/lcov.info -i ./coverage
dart pub global run coverage:format_coverage --packages=.dart_tool/package_config.json --report-on=lib --lcov -o ./coverage/coverage.lcov -i ./coverage

## Generate LCOV report:
genhtml -o ./coverage/report ./coverage/lcov.info
genhtml -o ./coverage/report ./coverage/coverage.lcov

## Open the HTML coverage report:
open ./coverage/report/index.html

0 comments on commit d1647e8

Please sign in to comment.