From 20202c6e961ba996896a4859a922f020c1c03601 Mon Sep 17 00:00:00 2001 From: Hadrien Renaud Date: Fri, 15 Mar 2024 10:24:30 +0000 Subject: [PATCH] [ci] Add workflow to check format --- .github/workflows/check-format.yml | 28 ++++++++++++++++++++++++++++ 1 file changed, 28 insertions(+) create mode 100644 .github/workflows/check-format.yml diff --git a/.github/workflows/check-format.yml b/.github/workflows/check-format.yml new file mode 100644 index 0000000000..b4a5e29c1f --- /dev/null +++ b/.github/workflows/check-format.yml @@ -0,0 +1,28 @@ +name: Check format with `dune fmt` + +on: + pull_request: + # push: + workflow_dispatch: + schedule: + # Prime the caches every Monday + - cron: 0 1 * * MON + +permissions: read-all + +jobs: + build: + runs-on: ubuntu-latest + + steps: + - name: Checkout tree + uses: actions/checkout@v4 + + - name: Set-up OCaml + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: 5.1 + + - run: opam install dune ocamlformat + + - run: opam exec -- dune fmt