Skip to content

Commit

Permalink
Add GitHub action for building/testing
Browse files Browse the repository at this point in the history
  • Loading branch information
sktrent committed Jan 12, 2024
1 parent 5c0ef7a commit d99fb7b
Show file tree
Hide file tree
Showing 3 changed files with 47 additions and 2 deletions.
40 changes: 40 additions & 0 deletions .github/workflows/run-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,40 @@
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.1"
include:
- ocaml-compiler: "5.1.1"
os: macos-latest
- ocaml-compiler: "5.1.1"
os: ubuntu-latest

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
6 changes: 5 additions & 1 deletion dune-project
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,11 @@
(package
(name middleware)
(synopsis "Composable stacked functions, which can respond to inner calls")
(depends ocaml dune)
(depends
(ocaml (>= 4.14.0))
(alcotest (and :with-test (>= 1.7.0)))
dune
)
(tags
(middleware composition funciton)))

Expand Down
3 changes: 2 additions & 1 deletion middleware.opam
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,8 @@ tags: ["middleware" "composition" "funciton"]
homepage: "https://github.com/skolemlabs/midddleware"
bug-reports: "https://github.com/skolemlabs/midddleware/issues"
depends: [
"ocaml"
"ocaml" {>= "4.14.0"}
"alcotest" {with-test & >= "1.7.0"}
"dune" {>= "3.11"}
"odoc" {with-doc}
]
Expand Down

0 comments on commit d99fb7b

Please sign in to comment.