added formatting CI task

This commit is contained in:
Jack Hodgkinson 2022-02-09 14:52:44 +00:00
parent 51da0cf080
commit ed160faa50
3 changed files with 38 additions and 13 deletions

33
.github/workflows/integrate.yaml vendored Normal file
View file

@ -0,0 +1,33 @@
on:
push:
paths:
- "**.hs"
- "**.nix"
- "flake.lock"
- "agora.cabal"
branches:
- master
pull_request:
paths:
- "**.hs"
- "**.nix"
- "flake.lock"
- "agora.cabal"
jobs:
check-formatting:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2.1.4
name: Cache Stack
with:
path: ~/.stack
key: ${{ runner.os }}-stack-formatting
restore-keys: ${{ runner.os }}-stack-
- run: stack install fourmolu
name: Setup
- run: ./.github/format.sh
name: "Run fourmolu"