validate code coverage on CI (dart-lang/markdown#474)
diff --git a/pkgs/markdown/.github/workflows/test-package.yml b/pkgs/markdown/.github/workflows/test-package.yml index 4e90396..82b378a 100644 --- a/pkgs/markdown/.github/workflows/test-package.yml +++ b/pkgs/markdown/.github/workflows/test-package.yml
@@ -59,3 +59,23 @@ - name: Run VM tests run: dart test --platform vm if: always() && steps.install.outcome == 'success' + + coverage: + needs: test + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@93ea575cb5d8a053eaa0ac8fa3b40d7e05a33cc8 + - uses: dart-lang/setup-dart@6a218f2413a3e78e9087f638a238f6b40893203d + with: + sdk: dev + - name: Install dependencies + run: dart pub get + - name: Install coverage + run: dart pub global activate coverage + - name: Collect and report coverage + run: dart pub global run coverage:test_with_coverage + - name: Upload coverage + uses: coverallsapp/github-action@master + with: + github-token: ${{ secrets.GITHUB_TOKEN }} + path-to-lcov: coverage/lcov.info
diff --git a/pkgs/markdown/README.md b/pkgs/markdown/README.md index cf6a000..a952014 100644 --- a/pkgs/markdown/README.md +++ b/pkgs/markdown/README.md
@@ -1,5 +1,7 @@ [](https://github.com/dart-lang/markdown/actions?query=workflow%3A"Dart+CI"+branch%3Amaster) [](https://pub.dev/packages/markdown) +[](https://pub.dev/packages/markdown/publisher) +[](https://coveralls.io/github/dart-lang/markdown?branch=master) A portable Markdown library written in Dart. It can parse Markdown into HTML on both the client and server.