Skip to content

Commit

Permalink
Merge pull request #96 from Workiva/O11Y-2370
Browse files Browse the repository at this point in the history
O11Y-2370: Report Code Coverage on PRs
  • Loading branch information
rmconsole7-wk authored Nov 15, 2022
2 parents 215f508 + 154e305 commit de232c2
Show file tree
Hide file tree
Showing 2 changed files with 21 additions and 1 deletion.
20 changes: 19 additions & 1 deletion .github/workflows/dart_ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,11 @@ on:
pull_request:
branches:
- '*'

permissions:
contents: read
issues: write
pull-requests: write

jobs:
test:
runs-on: ubuntu-latest
Expand All @@ -34,3 +38,17 @@ jobs:
run: make init
- name: Format, analyze, and run tests
run: make test
- name: Generate Coverage
run: dart run test --coverage=./coverage
- name: Activate Coverage Package
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
- name: Activate RemoveFromCoverage Package
run: dart pub global activate remove_from_coverage
- name: Ignore Files For Coverage
run: pub global run remove_from_coverage:remove_from_coverage -f coverage/lcov.info -r 'lib\/src\/sdk\/proto\/opentelemetry\/proto\/.+'
- uses: romeovs/lcov-reporter-action@v0.2.16
with:
lcov-file: ./coverage/lcov.info
github-token: ${{ secrets.GITHUB_TOKEN }}
2 changes: 2 additions & 0 deletions pubspec.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -15,5 +15,7 @@ dependencies:

dev_dependencies:
mockito: ^5.0.7
remove_from_coverage: ^2.0.0
test: ^1.16.5
workiva_analysis_options: ^1.2.2

0 comments on commit de232c2

Please sign in to comment.