From 9dbafa6b1236c89c6feb58fb5414549ac541bfd9 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Sun, 3 Oct 2021 15:18:55 +0900 Subject: [PATCH] Add lint-fmt job to GitHub Actions workflow Signed-off-by: Sora Morimoto --- .github/workflows/ci.yml | 22 ++++++++++++++++++++++ 1 file changed, 22 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index eb22bb82..e79766fd 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -57,3 +57,25 @@ jobs: with: name: sesterl-${{ matrix.os }} path: sesterl + + lint-fmt: + strategy: + matrix: + ocaml-compiler: + - 4.13.x + + runs-on: ubuntu-latest + + steps: + - name: Checkout code + uses: actions/checkout@v2 + + - name: Use OCaml ${{ matrix.ocaml-compiler }} + uses: ocaml/setup-ocaml@v2 + with: + ocaml-compiler: ${{ matrix.ocaml-compiler }} + dune-cache: true + + - run: opam depext ocamlformat=$(awk -F = 'NR==1 {print $2}' .ocamlformat) --install + + - run: opam exec -- dune build @fmt