Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[SKO-2340] Trent / Add GitHub action for building/testing #1

Merged
merged 1 commit into from
Jan 12, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
8 changes: 6 additions & 2 deletions dune-project
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
(lang dune 3.11)
(lang dune 3.1)

(name middleware)
(version 0.0.1)
Expand All @@ -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.2.0)))
dune
)
(tags
(middleware composition funciton)))

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