Skip to content

Commit 9c1c7c8

Browse files
committed
Enable coverage report
1 parent cfa55a4 commit 9c1c7c8

File tree

2 files changed

+14
-1
lines changed

2 files changed

+14
-1
lines changed

.github/workflows/ci.yml

Lines changed: 13 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -43,7 +43,19 @@ jobs:
4343
run: opam exec -- dune build @all @lint
4444

4545
- name: Run tests
46-
run: opam exec -- dune runtest
46+
run: |
47+
mkdir $BISECT_DIR
48+
opam exec -- dune runtest --instrument-with bisect_ppx
49+
env:
50+
BISECT_DIR: ${{ runner.temp }}/_bisect_ppx_data
51+
BISECT_FILE: ${{ runner.temp }}/_bisect_ppx_data/data
52+
53+
- name: Send coverage report to Coveralls
54+
run: opam exec -- bisect-ppx-report send-to Coveralls --coverage-path $BISECT_DIR
55+
env:
56+
BISECT_DIR: ${{ runner.temp }}/_bisect_ppx_data
57+
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
58+
PULL_REQUEST_NUMBER: ${{ github.event.number }}
4759

4860
- name: Check for uncommitted changes
4961
run: git diff --exit-code

README.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# auto-format
22

33
[![CI Status](https://github.com/mbarbin/auto-format/workflows/ci/badge.svg)](https://github.com/mbarbin/auto-format/actions/workflows/ci.yml)
4+
[![Coverage Status](https://coveralls.io/repos/github/mbarbin/auto-format/badge.svg?branch=main)](https://coveralls.io/github/mbarbin/auto-format?branch=main)
45

56
With this opinionated library you can build normalized auto-format commands for custom languages, that can be integrated with editors as well as `dune fmt`.
67

0 commit comments

Comments
 (0)