name: Build

on:
  push:

jobs:
  build:
    runs-on: ubuntu-latest
    steps:
      - name: Checkout tree
        uses: actions/checkout@v3

      - name: Set-up OCaml
        uses: ocaml/setup-ocaml@v2
        with:
          ocaml-compiler: 5.0
      - name: Install dependencies
        run: opam install . --deps-only --with-test
      - name: Build
        run: opam exec -- dune build
      - name: Test
        run: opam exec -- dune runtest
