diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 0628403..1833944 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -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 diff --git a/.github/workflows/publish.yml b/.github/workflows/publish.yml index f4a497c..aaa001f 100644 --- a/.github/workflows/publish.yml +++ b/.github/workflows/publish.yml @@ -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 diff --git a/format_coverage.sh b/format_coverage.sh index 0b049f7..1adf541 100644 --- a/format_coverage.sh +++ b/format_coverage.sh @@ -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 \ No newline at end of file