Skip to content

Commit 49f61b6

Browse files
committed
ci: modernize and add later GHC versions
1 parent ba4965c commit 49f61b6

File tree

1 file changed

+25
-13
lines changed

1 file changed

+25
-13
lines changed

.github/workflows/servant-typescript.yaml

Lines changed: 25 additions & 13 deletions
Original file line numberDiff line numberDiff line change
@@ -18,15 +18,19 @@ jobs:
1818
- "8.8.4"
1919
- "8.10.7"
2020
- "9.0.2"
21+
- "9.2.8"
22+
- "9.4.8"
23+
- "9.6.6"
24+
- "9.8.4"
25+
- "9.10.1"
2126
# exclude:
2227
# - os: macOS-latest
2328
# ghc: 8.8.3
2429

2530
steps:
26-
- uses: actions/checkout@v2
27-
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'
31+
- uses: actions/checkout@v4
2832

29-
- uses: haskell/actions/setup@v1
33+
- uses: haskell-actions/setup@v2
3034
id: setup-haskell-cabal
3135
name: Setup Haskell
3236
with:
@@ -35,13 +39,15 @@ jobs:
3539

3640
- name: Freeze
3741
run: |
42+
cabal update
43+
cabal configure --enable-tests
3844
cabal freeze
3945
40-
- uses: actions/cache@v1
46+
- uses: actions/cache@v3
4147
name: Cache ~/.cabal/store
4248
with:
4349
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
44-
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
50+
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}-key2
4551

4652
# Install TSC
4753
# - uses: actions/setup-node@v2
@@ -67,22 +73,22 @@ jobs:
6773
fail-fast: false
6874
matrix:
6975
ghc:
70-
- "8.8.4"
71-
- "8.10.7"
72-
- "9.0.2"
76+
- "8.8.4"
77+
- "8.10.7"
78+
- "9.0.2"
7379

7480
steps:
75-
- uses: actions/checkout@v2
76-
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/main'
81+
- uses: actions/checkout@v4
7782

78-
- uses: haskell/actions/setup@v1
83+
- uses: haskell-actions/setup@v2
7984
name: Setup Haskell Stack
8085
with:
8186
ghc-version: ${{ matrix.ghc }}
8287
stack-version: "latest"
8388

84-
- uses: actions/cache@v1
85-
name: Cache ~/.stack
89+
- uses: actions/cache/restore@v4
90+
name: Cache restore ~/.stack
91+
id: cache-restore
8692
with:
8793
path: ~/.stack
8894
key: ${{ runner.os }}-${{ matrix.ghc }}-stack
@@ -102,3 +108,9 @@ jobs:
102108
# - name: Test
103109
# run: |
104110
# stack test --system-ghc
111+
112+
- uses: actions/cache/save@v4
113+
if: always() && steps.cache-restore.outputs.cache-hit != 'true'
114+
with:
115+
path: ~/.stack
116+
key: ${{ runner.os }}-${{ matrix.ghc }}-stack

0 commit comments

Comments
 (0)