@@ -2,8 +2,7 @@ name: Haskell CI
2
2
3
3
on :
4
4
push :
5
- branches :
6
- - " *"
5
+ branches : [ "main", "ci" ]
7
6
pull_request :
8
7
branches : [ "main" ]
9
8
@@ -13,47 +12,37 @@ permissions:
13
12
jobs :
14
13
build :
15
14
16
- strategy :
17
- matrix :
18
- os : [ ubuntu-22.04 ]
19
- haskell : [ 9.4.7 ]
15
+ runs-on : ubuntu-latest
20
16
21
- runs-on : ${{ matrix.os }}
17
+ container :
18
+ image : haskell:9.8.2
22
19
23
20
steps :
24
- - uses : actions/checkout@v3
25
-
26
- - name : Check Haskell version
27
- run : |
28
- ghcup --version
29
- ghc --version
30
- - name : Install Haskell ${{ matrix.haskell }}
31
- run : |
32
- ghcup install ghc ${{ matrix.haskell }}
33
- ghcup set ghc ${{ matrix.haskell }}
34
- - name : Check Haskell version
35
- run : ghc --version
36
-
37
- - name : Cache
38
- uses : actions/cache@v3
39
- env :
40
- # increment when you want to rebuild the cache
41
- cache-name : cache-cabal-v6
42
- with :
43
- path : /home/runner/.local/state/cabal
44
- key : ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
45
- restore-keys : |
46
- ${{ runner.os }}-build-${{ env.cache-name }}-
47
- ${{ runner.os }}-build-
48
- ${{ runner.os }}-
49
-
21
+ - uses : actions/checkout@v4
22
+
23
+ # - uses: actions/setup-haskell@v1
24
+ # with:
25
+ # ghc-version: '9.6'
26
+ # cabal-version: '3.2'
27
+
28
+ # - name: Cache
29
+ # uses: actions/cache@v3
30
+ # env:
31
+ # cache-name: cache-cabal
32
+ # with:
33
+ # path: ~/.cabal
34
+ # key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/*.cabal') }}-${{ hashFiles('**/cabal.project') }}
35
+ # restore-keys: |
36
+ # ${{ runner.os }}-build-${{ env.cache-name }}-
37
+ # ${{ runner.os }}-build-
38
+ # ${{ runner.os }}-
50
39
51
40
- name : Install dependencies
52
41
run : |
53
42
cabal update
54
43
cabal build --only-dependencies --enable-tests --enable-benchmarks
55
44
- name : Build
56
45
run : cabal build --enable-tests --enable-benchmarks all
57
- - name : Run tests
58
- run : cabal test all
46
+ - name : Test
47
+ run : cabal test
59
48
0 commit comments