Skip to content

Commit

Permalink
ci: rewrite fmt job (#6334)
Browse files Browse the repository at this point in the history
This one should be much faster.

Signed-off-by: Ali Caglayan <[email protected]>
  • Loading branch information
Alizter authored Oct 26, 2022
1 parent 8c279b6 commit a40261f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 13 deletions.
18 changes: 5 additions & 13 deletions .github/workflows/workflow.yml
Original file line number Diff line number Diff line change
Expand Up @@ -116,21 +116,13 @@ jobs:
- uses: cachix/install-nix-action@v18
- run: nix build

lint-fmt:
fmt:
name: Format
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Use OCaml 4.14.x
uses: ocaml/setup-ocaml@v2
with:
ocaml-compiler: 4.14.x
opam-pin: false
opam-depext: false

- name: Install ocamlformat
run: opam exec -- make install-ocamlformat
- run: opam exec -- make fmt
- uses: actions/checkout@v3
- uses: cachix/install-nix-action@v18
- run: nix develop .#fmt -c make fmt

doc:
name: Documentation
Expand Down
6 changes: 6 additions & 0 deletions flake.nix
Original file line number Diff line number Diff line change
Expand Up @@ -73,6 +73,12 @@
);
};

devShells.fmt =
pkgs.mkShell {
inputsFrom = [ pkgs.dune_3 ];
buildInputs = [ ocamlformat ];
};

devShells.slim = with pkgs.ocamlPackages; pkgs.mkShell {
inputsFrom = [ dune_3 ];
nativeBuildInputs = with pkgs; [ pkg-config nodejs-slim ];
Expand Down

0 comments on commit a40261f

Please sign in to comment.