-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
7122a68
commit 5854450
Showing
1 changed file
with
24 additions
and
1 deletion.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,6 +10,10 @@ on: | |
# Allows you to run this workflow manually from the Actions tab | ||
workflow_dispatch: | ||
|
||
# We need to comment coverage information | ||
permissions: | ||
pull-requests: write | ||
|
||
# Make sure there's only one ci triggerd for a non-master branch | ||
concurrency: | ||
group: ${{ github.ref }} | ||
|
@@ -61,11 +65,30 @@ 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 | ||
|
||
- uses: jwalton/gh-find-current-pr@v1 | ||
id: finder | ||
- name: Add Coverage PR Comment | ||
uses: marocchino/sticky-pull-request-comment@v2 | ||
if: github.event_name == 'pull_request' | ||
with: | ||
number: ${{ steps.finder.outputs.pr }} | ||
hide: true | ||
hide_classify: "OUTDATED" | ||
path: code-coverage-results.md |