From 72338ee29548dbed22cdb4880765016e29265f79 Mon Sep 17 00:00:00 2001 From: Dorian Lesbre Date: Fri, 12 Apr 2024 13:56:59 +0200 Subject: [PATCH] Add missing dep + test on CI --- .github/workflows/ocaml.yml | 9 +++++++-- PatriciaTree.opam | 1 + dune-project | 5 ++++- patriciaTreeTest.ml | 2 +- 4 files changed, 13 insertions(+), 4 deletions(-) diff --git a/.github/workflows/ocaml.yml b/.github/workflows/ocaml.yml index 83f2930..1c11adf 100644 --- a/.github/workflows/ocaml.yml +++ b/.github/workflows/ocaml.yml @@ -30,6 +30,11 @@ jobs: with: ocaml-compiler: ${{ matrix.ocaml-compiler }} - - run: opam install . --deps-only --with-test + - name: Install dependencies + run: opam install . --deps-only --with-test - - run: opam exec -- dune build + - name: Build library + run: opam exec -- dune build + + - name: Run unit tests + run: opam exec -- dune test diff --git a/PatriciaTree.opam b/PatriciaTree.opam index 628fb66..1992880 100644 --- a/PatriciaTree.opam +++ b/PatriciaTree.opam @@ -16,6 +16,7 @@ depends: [ "qcheck-core" {>= "0.21.2"} "zarith" {>= "1.13"} "dune" {>= "2.0"} + "ppx_inline_test" {>= "v0.16.0"} ] build: [ ["dune" "subst"] {pinned} diff --git a/dune-project b/dune-project index 78091fc..1bc7f6d 100644 --- a/dune-project +++ b/dune-project @@ -1,4 +1,5 @@ (lang dune 2.0) + ;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;;; ;; This file is part of the Patricia Tree library. ;; ;; ;; @@ -48,4 +49,6 @@ (zarith (>= "1.13")) (dune - (>= "2.0")))) + (>= "2.0")) + (ppx_inline_test + (>= "v0.16.0")))) diff --git a/patriciaTreeTest.ml b/patriciaTreeTest.ml index 728640d..4567604 100644 --- a/patriciaTreeTest.ml +++ b/patriciaTreeTest.ml @@ -488,7 +488,7 @@ let%test_module _ = (module struct (* dump_test model1 model2 myres modelres; *) (* Printf.printf "res is %b\n%!" @@ IntMap.equal (=) modelres myres; *) modelres == myres) - let () = QCheck.Test.check_exn test_disjoint;; + let () = QCheck.Test.check_exn test_disjoint end)