Skip to content

Commit

Permalink
show coverage information
Browse files Browse the repository at this point in the history
  • Loading branch information
butterunderflow committed Aug 4, 2024
1 parent 7122a68 commit 73fe45d
Showing 1 changed file with 16 additions and 1 deletion.
17 changes: 16 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -61,11 +61,26 @@ jobs:
- name: Run tests
run: opam exec -- dune runtest

- name: Get test with coverage instrumentation
- name: Test with coverage instrumentation
run: |
mkdir $BISECT_DIR
opam exec -- dune runtest --instrument-with bisect_ppx --force
opam exec -- bisect-ppx-report summary --per-file --coverage-path=$BISECT_DIR >> $GITHUB_STEP_SUMMARY
opam exec -- bisect-ppx-report cobertura cobertura.xml --coverage-path=$BISECT_DIR
env:
BISECT_DIR: ${{ runner.temp }}/_coverage
BISECT_FILE: ${{ runner.temp }}/_coverage/bisect_data

- name: Code Coverage Summary
uses: irongut/[email protected]
with:
filename: cobertura.xml
badge: true
format: markdown

- name: Add Coverage PR Comment
uses: marocchino/sticky-pull-request-comment@v2
if: github.event_name == 'pull_request'
with:
recreate: true
path: code-coverage-results.md

0 comments on commit 73fe45d

Please sign in to comment.