Skip to content

Commit

Permalink
add code coverage (#93)
Browse files Browse the repository at this point in the history
Signed-off-by: Ali Caglayan <alizter@gmail.com>
  • Loading branch information
Alizter committed Apr 25, 2023
1 parent 950ebdd commit 98a35c8
Show file tree
Hide file tree
Showing 4 changed files with 43 additions and 3 deletions.
34 changes: 34 additions & 0 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -49,3 +49,37 @@ jobs:
- run: opam install --deps-only --with-doc --with-test .
- run: opam exec -- dune build
- run: opam exec -- dune runtest

coverage:
name: Coverage
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
ocaml-compiler:
- 4.14.x
steps:
- uses: actions/checkout@v3
- name: Use OCaml ${{ matrix.ocaml-compiler }}
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
opam-local-packages: lev.opam lev-fiber.opam lev-fiber-csexp.opam

- name: Set git user
run: |
git config --global user.name github-actions[bot]
git config --global user.email github-actions[bot]@users.noreply.github.com
- name: Install deps
run: |
opam install . --deps-only --with-doc --with-test
opam install bisect_ppx
- name: Run and send coverage
run: |
opam exec -- dune build --instrument-with bisect_ppx --force @runtest
opam exec -- bisect-ppx-report send-to Coveralls
continue-on-error: true
env:
COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }}
PULL_REQUEST_NUMBER: ${{ github.event.number }}
4 changes: 3 additions & 1 deletion lev-fiber-csexp/src/dune
Original file line number Diff line number Diff line change
@@ -1,4 +1,6 @@
(library
(name lev_fiber_csexp)
(public_name lev-fiber-csexp)
(libraries fiber csexp stdune dyn lev_fiber))
(libraries fiber csexp stdune dyn lev_fiber)
(instrumentation
(backend bisect_ppx)))
4 changes: 3 additions & 1 deletion lev-fiber/src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -7,4 +7,6 @@
(public_name lev-fiber)
(instrumentation
(backend bisect_ppx))
(libraries unix dyn stdune threads.posix fiber lev lev_fiber_util))
(libraries unix dyn stdune threads.posix fiber lev lev_fiber_util)
(instrumentation
(backend bisect_ppx)))
4 changes: 3 additions & 1 deletion lev/src/dune
Original file line number Diff line number Diff line change
Expand Up @@ -24,4 +24,6 @@
(backend bisect_ppx))
(foreign_stubs
(language c)
(names lev_stubs)))
(names lev_stubs))
(instrumentation
(backend bisect_ppx)))

0 comments on commit 98a35c8

Please sign in to comment.