Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

add code coverage #93

Merged
merged 1 commit into from
Apr 25, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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)))