-
Notifications
You must be signed in to change notification settings - Fork 1
63 lines (58 loc) · 1.71 KB
/
ci.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
on:
pull_request:
branches:
- main
push:
branches:
- main
jobs:
build:
strategy:
fail-fast: false
matrix:
os:
- macos-latest
# Need to learn more about ocaml and opam on windows, this fails with some cygwin and
# pkg-config errors I haven't pinned down
# - windows-latest
ocaml-compiler:
- 4.14.x
runs-on: ${{ matrix.os }}
steps:
- name: checkout repo
uses: actions/checkout@v1
- name: get ocaml ${{ matrix.ocaml-version }}
uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: ${{ matrix.ocaml-compiler }}
- name: pin
run: opam pin add . --yes --no-action
- name: opam install
run: opam install . --deps-only --with-doc --with-test
- name: build
run: opam exec -- dune build
- name: test
run: opam exec -- dune runtest
test-ubuntu-latest-with-coverage:
name: ubuntu-latest test with coverage
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v1
- name: get ocaml
uses: avsm/setup-ocaml@v2
with:
ocaml-compiler: 4.14.x
- name: pin
run: opam pin add . --yes --no-action
- name: opam install
run: opam install . --deps-only --with-doc --with-test
- name: build
run: opam exec -- dune build
- name: test with coverage
run: opam exec -- dune runtest --instrument-with bisect_ppx --force
- name: generage coverage
run: opam exec -- bisect-ppx-report html
- name: report coverage
run: opam exec -- bisect-ppx-report summary
- name: send to codecov
run: opam exec -- bisect-ppx-report send-to Codecov