Skip to content

Latest commit

 

History

History
29 lines (26 loc) · 1.25 KB

README.md

File metadata and controls

29 lines (26 loc) · 1.25 KB

Code Coverage Notes

  • store repo code coverage in git-notes.
  • add coverage diff to PRs (example):
    @@ Coverage info. Don't edit past this section @@
    + instruction: 60% (+1)
    + line: 61% (+1)
    class: 78%
    + branch: 44% (+1)
    + method: 67% (+2)
    + complexity: 57% (+1)
  • Java (jacoco) and GCC (cobertura) reports supported

Integration

  1. Enable actions to push notes to the repo in settings: repo_settings.png
  2. Add action for PR open/reopen events, example: https://github.com/sukolenvo/simple-cpp-github-rest/blob/master/.github/workflows/coverage-notes-pr.yml
  3. Update CI action that runs tests & code coverage on push event (example):
       - name: coverage-note
         uses: sukolenvo/[email protected]
         if: ${{ matrix.compiler.gcovExecutable != '' && matrix.build-type == 'Debug' }}
         continue-on-error: true
         with:
           repo_token: ${{ secrets.GITHUB_TOKEN }}
           cobertura: build/coverage.xml