From 5bc353ae048d49e563616a1485f9aed1ba5a8a63 Mon Sep 17 00:00:00 2001 From: Antoine Pouille Date: Wed, 25 Sep 2024 17:00:00 +0200 Subject: [PATCH] Add ocamlformat to CI --- .github/workflows/ci.yml | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index e8fcc0b65..8835aad07 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -1,6 +1,25 @@ name: ci on: [push] jobs: + lint-ocamlformat: + runs-on: ubuntu-22.04 + steps: + - name: Checkout + uses: actions/checkout@v4 + - name: Setup OCaml + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: 4.14.x + - name: Install dependencies + run: | + sudo apt-get update + opam depext --install --yes dune + opam install --yes ocamlformat=0.26.2 + - name: Run format check + run: | + # needs `opam exec --` as `dune` is not in the shell PATH + opam exec -- dune fmt --preview + install-ubuntu: runs-on: ubuntu-22.04 strategy: