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