File tree Expand file tree Collapse file tree 2 files changed +46
-9
lines changed
Expand file tree Collapse file tree 2 files changed +46
-9
lines changed Original file line number Diff line number Diff line change 1515 - uses : actions/checkout@11bd71901bbe5b1630ceea73d27597364c9af683 # v4.2.2
1616 - uses : haskell-actions/run-fourmolu@3b7702b41516aa428dfe6e295dc73476ae58f69e # v11
1717 with :
18- version : " 0.14 .0.0"
18+ version : " 0.17 .0.0"
1919 build :
2020 name : GHC ${{ matrix.ghc-version }} on ${{ matrix.os }}
2121 runs-on : ${{ matrix.os }}
@@ -43,12 +43,10 @@ jobs:
4343 echo "CABAL_VERSION=${CABAL_VERSION}" >> "${GITHUB_ENV}"
4444
4545 - name : Check cabal file
46- run : cabal check
46+ run : make cabal- check
4747
4848 - name : Configure the build
49- run : |
50- cabal configure --enable-tests --enable-benchmarks --disable-documentation
51- cabal build --dry-run
49+ run : make configure
5250
5351 - name : Restore cached dependencies
5452 uses : actions/cache/restore@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
6159 restore-keys : ${{ env.key }}-
6260
6361 - name : Build dependencies
64- run : cabal build --only-dependencies
62+ run : make deps
6563
6664 - name : Save cached dependencies
6765 uses : actions/cache/save@5a3ec84eff668545956fd18022155c47e93e2684 # v4.2.3
@@ -71,10 +69,10 @@ jobs:
7169 key : ${{ steps.cache.outputs.cache-primary-key }}
7270
7371 - name : Build the package
74- run : cabal build all
72+ run : make build
7573
7674 - name : Run tests
77- run : cabal test all
75+ run : make test
7876
7977 - name : Build documentation
80- run : cabal haddock all --disable-documentation
78+ run : make docs
Original file line number Diff line number Diff line change 1+ HS_FILES := $(shell git ls-files '* .hs')
2+
3+ .PHONY : format
4+ format :
5+ @test -n " $( HS_FILES) " || { echo " No tracked .hs files found" ; exit 0; }
6+ fourmolu -i $(HS_FILES )
7+
8+ .PHONY : format-check
9+ format-check :
10+ @test -n " $( HS_FILES) " || { echo " No tracked .hs files found" ; exit 0; }
11+ fourmolu -m check $(HS_FILES )
12+
13+ .PHONY : cabal-check
14+ cabal-check :
15+ cabal check
16+
17+ .PHONY : configure
18+ configure :
19+ cabal configure --enable-tests --enable-benchmarks --disable-documentation
20+ cabal build --dry-run
21+
22+ .PHONY : deps
23+ deps :
24+ cabal build --only-dependencies
25+
26+ .PHONY : build
27+ build :
28+ cabal build all
29+
30+ .PHONY : test
31+ test :
32+ cabal test all
33+
34+ .PHONY : docs
35+ docs :
36+ cabal haddock all --disable-documentation
37+
38+ .PHONY : ci
39+ ci : fmt-check cabal-check configure deps build test docs
You can’t perform that action at this time.
0 commit comments