on master help sign in
Added format check
commitb8f2e01674a7e37a332851cd40b51c1f1e29bc47 authoriko <ilyakooo0@gmail.com> dateTue 11 Jan 2022, 17:24 (5 years ago) parentfdcbb2a
2 files changed+22
.github/workflows/github-actions-image.yaml+16 nix/ci.nix+6
.github/workflows/github-actions-image.yaml+16
@@ -9,6 +9,22 @@ on:
99 types: [prereleased]
1010
1111jobs:
12+ check-formatting:
13+ name: Check Haskell formatting
14+ runs-on: ubuntu-latest
15+ steps:
16+ - uses: actions/checkout@v2
17+
18+ - name: Common setup
19+ uses: ./.github/actions/common_setup
20+ with:
21+ authToken: ${{ secrets.CACHIX_AUTH_TOKEN }}
22+
23+ - name: Run fourmolu
24+ run: |
25+ nix-shell nix/ci.nix -j auto --run "git ls-files '*.hs' | xargs fourmolu -m inplace -o -XRecursiveDo -o -XTypeApplications -o -XPatternSynonyms -o -XBangPatterns"
26+ git diff --exit-code
27+
1228 policeman:
1329 runs-on: ubuntu-latest
1430 steps:
nix/ci.nixnew file+6
@@ -0,0 +1,6 @@
1+{ sources ? import ./sources.nix
2+, pkgs ? import sources.nixpkgs { }
3+}:
4+pkgs.mkShell {
5+ packages = [ pkgs.haskellPackages.fourmolu ];
6+}