Skip to content

Commit 55395aa

Browse files
committed
Test packages individually
1 parent 596be49 commit 55395aa

9 files changed

Lines changed: 94 additions & 14 deletions

.github/workflows/workflow.yml

Lines changed: 23 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -23,6 +23,14 @@ jobs:
2323
- 4.11.x
2424
- 4
2525
- 5
26+
package:
27+
- ppx_protocol_conv
28+
- ppx_protocol_conv_json
29+
- ppx_protocol_conv_jsonm
30+
- ppx_protocol_conv_msgpack
31+
- ppx_protocol_conv_xml_light
32+
- ppx_protocol_conv_xmlm
33+
- ppx_protocol_conv_yaml
2634

2735
runs-on: ${{ matrix.os }}
2836

@@ -34,15 +42,23 @@ jobs:
3442
uses: ocaml/setup-ocaml@v3
3543
with:
3644
ocaml-compiler: ${{ matrix.ocaml-compiler }}
37-
cache: true
3845
dune-cache: true
3946

40-
- name: Install dependencies
47+
- name: Install dependencies (${{ matrix.package }})
4148
run: |
42-
opam install . --deps-only --with-doc --with-test
49+
opam_files="./ppx_protocol_conv.opam"
50+
if [ "${{ matrix.package }}" != "ppx_protocol_conv" ]; then
51+
opam_files="$opam_files ./${{ matrix.package }}.opam"
52+
fi
53+
opam install $opam_files --deps-only --with-doc --with-test
4354
44-
- name: Build
45-
run: opam exec -- dune build @install
55+
- name: Build (${{ matrix.package }})
56+
run: |
57+
dune_packages="${{ matrix.package }}"
58+
if [ "${{ matrix.package }}" != "ppx_protocol_conv" ]; then
59+
dune_packages="ppx_protocol_conv,${{ matrix.package }}"
60+
fi
61+
opam exec -- dune build -p "$dune_packages" @install
4662
47-
- name: Test
48-
run: opam exec -- dune runtest
63+
- name: Test (${{ matrix.package }})
64+
run: opam exec -- dune runtest -p ${{ matrix.package }}

dune-project

Lines changed: 39 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,10 @@
1717
(depends
1818
(ocaml (>= 4.08))
1919
(base (>= v0.14.0))
20-
(ppxlib (>= 0.36.0))))
20+
(ppxlib (>= 0.36.0))
21+
(ppx_sexp_conv :with-test)
22+
(sexplib :with-test)
23+
(alcotest :with-test)))
2124

2225
(package
2326
(name ppx_protocol_conv_json)
@@ -26,15 +29,26 @@
2629
"This package provides a driver for json (Yojson.Safe.json) serialization and de-serialization using the yojson library")
2730
(depends
2831
(ocaml (>= 4.08))
29-
(yojson (>= 1.6.0))))
32+
(ppx_protocol_conv (= :version))
33+
(yojson (>= 1.6.0))
34+
ppx_expect
35+
ppx_inline_test
36+
(ppx_sexp_conv :with-test)
37+
(sexplib :with-test)
38+
(alcotest :with-test)))
3039

3140
(package
3241
(name ppx_protocol_conv_jsonm)
3342
(synopsis "Jsonm driver for Ppx_protocol_conv")
3443
(description
3544
"This package provides a driver for json (Ezjson.value) serialization and de-serialization using the Ezjson library")
3645
(depends
37-
(ocaml (>= 4.08))))
46+
(ocaml (>= 4.08))
47+
(ppx_protocol_conv (= :version))
48+
ezjsonm
49+
(ppx_sexp_conv :with-test)
50+
(sexplib :with-test)
51+
(alcotest :with-test)))
3852

3953
(package
4054
(name ppx_protocol_conv_msgpack)
@@ -43,15 +57,24 @@
4357
"This package provides a driver for message pack (Msgpck.t) serialization and deserialization using the msgpck library")
4458
(depends
4559
(ocaml (>= 4.08))
46-
(msgpck (>= 1.3))))
60+
(ppx_protocol_conv (= :version))
61+
(msgpck (>= 1.3))
62+
(ppx_sexp_conv :with-test)
63+
(sexplib :with-test)
64+
(alcotest :with-test)))
4765

4866
(package
4967
(name ppx_protocol_conv_xml_light)
5068
(synopsis "Xml driver for Ppx_protocol_conv")
5169
(description
5270
"This package provides a driver for xml (Xml.t) serialization and de-serialization using the xml-light library")
5371
(depends
54-
(ocaml (>= 4.08))))
72+
(ocaml (>= 4.08))
73+
(ppx_protocol_conv (= :version))
74+
xml-light
75+
(ppx_sexp_conv :with-test)
76+
(sexplib :with-test)
77+
(alcotest :with-test)))
5578

5679
(package
5780
(name ppx_protocol_conv_xmlm)
@@ -62,7 +85,12 @@
6285
"Anders Fugmann <anders@fugmann.net>"
6386
"Nick Betteridge <lists.nick.betteridge@gmail.com>")
6487
(depends
65-
(ocaml (>= 4.08))))
88+
(ocaml (>= 4.08))
89+
(ppx_protocol_conv (= :version))
90+
ezxmlm
91+
(ppx_sexp_conv :with-test)
92+
(sexplib :with-test)
93+
(alcotest :with-test)))
6694

6795
(package
6896
(name ppx_protocol_conv_yaml)
@@ -71,4 +99,8 @@
7199
"This package provides a driver for yaml (Yaml.value) serialization and de-serialization using the Yaml")
72100
(depends
73101
(ocaml (>= 4.08))
74-
(yaml (>= 2.0.0))))
102+
(ppx_protocol_conv (= :version))
103+
(yaml (>= 2.0.0))
104+
(ppx_sexp_conv :with-test)
105+
(sexplib :with-test)
106+
(alcotest :with-test)))

ppx_protocol_conv.opam

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -22,6 +22,9 @@ depends: [
2222
"ocaml" {>= "4.08"}
2323
"base" {>= "v0.14.0"}
2424
"ppxlib" {>= "0.36.0"}
25+
"ppx_sexp_conv" {with-test}
26+
"sexplib" {with-test}
27+
"alcotest" {with-test}
2528
"odoc" {with-doc}
2629
]
2730
build: [

ppx_protocol_conv_json.opam

Lines changed: 6 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,13 @@ bug-reports: "https://github.com/andersfugmann/ppx_protocol_conv/issues"
1111
depends: [
1212
"dune" {>= "3.18"}
1313
"ocaml" {>= "4.08"}
14+
"ppx_protocol_conv" {= version}
1415
"yojson" {>= "1.6.0"}
16+
"ppx_expect"
17+
"ppx_inline_test"
18+
"ppx_sexp_conv" {with-test}
19+
"sexplib" {with-test}
20+
"alcotest" {with-test}
1521
"odoc" {with-doc}
1622
]
1723
build: [

ppx_protocol_conv_jsonm.opam

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ bug-reports: "https://github.com/andersfugmann/ppx_protocol_conv/issues"
1111
depends: [
1212
"dune" {>= "3.18"}
1313
"ocaml" {>= "4.08"}
14+
"ppx_protocol_conv" {= version}
15+
"ezjsonm"
16+
"ppx_sexp_conv" {with-test}
17+
"sexplib" {with-test}
18+
"alcotest" {with-test}
1419
"odoc" {with-doc}
1520
]
1621
build: [

ppx_protocol_conv_msgpack.opam

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ bug-reports: "https://github.com/andersfugmann/ppx_protocol_conv/issues"
1111
depends: [
1212
"dune" {>= "3.18"}
1313
"ocaml" {>= "4.08"}
14+
"ppx_protocol_conv" {= version}
1415
"msgpck" {>= "1.3"}
16+
"ppx_sexp_conv" {with-test}
17+
"sexplib" {with-test}
18+
"alcotest" {with-test}
1519
"odoc" {with-doc}
1620
]
1721
build: [

ppx_protocol_conv_xml_light.opam

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,11 @@ bug-reports: "https://github.com/andersfugmann/ppx_protocol_conv/issues"
1111
depends: [
1212
"dune" {>= "3.18"}
1313
"ocaml" {>= "4.08"}
14+
"ppx_protocol_conv" {= version}
15+
"xml-light"
16+
"ppx_sexp_conv" {with-test}
17+
"sexplib" {with-test}
18+
"alcotest" {with-test}
1419
"odoc" {with-doc}
1520
]
1621
build: [

ppx_protocol_conv_xmlm.opam

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -14,6 +14,11 @@ bug-reports: "https://github.com/andersfugmann/ppx_protocol_conv/issues"
1414
depends: [
1515
"dune" {>= "3.18"}
1616
"ocaml" {>= "4.08"}
17+
"ppx_protocol_conv" {= version}
18+
"ezxmlm"
19+
"ppx_sexp_conv" {with-test}
20+
"sexplib" {with-test}
21+
"alcotest" {with-test}
1722
"odoc" {with-doc}
1823
]
1924
build: [

ppx_protocol_conv_yaml.opam

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,11 @@ bug-reports: "https://github.com/andersfugmann/ppx_protocol_conv/issues"
1111
depends: [
1212
"dune" {>= "3.18"}
1313
"ocaml" {>= "4.08"}
14+
"ppx_protocol_conv" {= version}
1415
"yaml" {>= "2.0.0"}
16+
"ppx_sexp_conv" {with-test}
17+
"sexplib" {with-test}
18+
"alcotest" {with-test}
1519
"odoc" {with-doc}
1620
]
1721
build: [

0 commit comments

Comments
 (0)