diff --git a/.github/workflows/dart.yml b/.github/workflows/dart.yml index 8a195c2..1d0087c 100644 --- a/.github/workflows/dart.yml +++ b/.github/workflows/dart.yml @@ -46,4 +46,16 @@ 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 \ No newline at end of file + run: dart test --coverage="coverage" + + - name: Install coverage tools + 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 + + - name: Upload Coverage to CodeCov + uses: codecov/codecov-action@v3 + with: + token: ${{secrets.CODECOV_TOKEN}} + file: coverage/coverage.lcov \ No newline at end of file