diff --git a/.github/workflows/run-tests.yml b/.github/workflows/run-tests.yml new file mode 100644 index 0000000..ed123e1 --- /dev/null +++ b/.github/workflows/run-tests.yml @@ -0,0 +1,36 @@ +name: Run tests + +on: + pull_request: + +permissions: read-all + +jobs: + build: + strategy: + fail-fast: false + matrix: + os: + - macos-latest + - ubuntu-latest + - windows-latest + ocaml-compiler: + - "4.14" + - "5.1" + + runs-on: ${{ matrix.os }} + + steps: + - name: Checkout tree + uses: actions/checkout@v4 + + - name: Set-up OCaml ${{ matrix.ocaml-compiler }} + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + + - run: opam install . --deps-only --with-test + + - run: opam exec -- dune build + + - run: opam exec -- dune runtest diff --git a/dune-project b/dune-project index 107d6b8..d9ef7d4 100644 --- a/dune-project +++ b/dune-project @@ -17,7 +17,10 @@ (package (name middleware) (synopsis "Composable stacked functions, which can respond to inner calls") - (depends ocaml dune) + (depends + (ocaml (>= 4.14.0)) + dune + ) (tags (middleware composition funciton))) diff --git a/middleware.opam b/middleware.opam index 3f8cc2b..e840faa 100644 --- a/middleware.opam +++ b/middleware.opam @@ -9,7 +9,7 @@ tags: ["middleware" "composition" "funciton"] homepage: "https://github.com/skolemlabs/midddleware" bug-reports: "https://github.com/skolemlabs/midddleware/issues" depends: [ - "ocaml" + "ocaml" {>= "4.14.0"} "dune" {>= "3.11"} "odoc" {with-doc} ]