-
Notifications
You must be signed in to change notification settings - Fork 2
47 lines (41 loc) · 1 KB
/
format.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
name: format
on:
push:
branches:
- master
pull_request:
branches:
- '*'
schedule:
- cron: "00 15 * * *"
jobs:
ormolu:
runs-on: ubuntu-18.04
steps:
- uses: actions/checkout@v2
- uses: mrkkrp/ormolu-action@v1
with:
extra-args: "-o -XTypeApplications -o -XBangPatterns"
cabal-fmt:
runs-on: ubuntu-18.04
strategy:
matrix:
cache-version: ["2020-11-28"]
steps:
- uses: actions/checkout@v2
- uses: actions/cache@v2
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.cache-version }}-cabal
- name: Install cabal-fmt
run: |
cabal update
cabal install cabal-fmt --overwrite-policy=always --install-method=copy -j2 -z
- name: Apply cabal-fmt
run: |
export PATH=~/.cabal/bin/:$PATH
cabal-fmt -i *.cabal
cabal-fmt -i subs/*/*.cabal
cabal-fmt -n cabal.project
git --no-pager diff --exit-code