From f4d8f253fed38e942654bb7b7a17d88be0549840 Mon Sep 17 00:00:00 2001 From: Sora Morimoto Date: Sun, 3 Oct 2021 08:48:09 +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 1e096a7a..2fc91d3f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -56,3 +56,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