1- name : Cabal (macOS and Windows)
2-
1+ name : Cabal
32on :
43 push :
54 branches :
65 - master
76 paths :
8- - ' .github/workflows/macOS .yml'
7+ - ' .github/workflows/cabal-mac-win .yml'
98 - ' tasty-silver.cabal'
109 - ' Setup.hs'
1110 - ' Test/**.hs'
1211 - ' tests/**'
1312 pull_request :
1413 paths :
15- - ' .github/workflows/macOS .yml'
14+ - ' .github/workflows/cabal-mac-win .yml'
1615 - ' tasty-silver.cabal'
1716 - ' Setup.hs'
1817 - ' Test/**.hs'
@@ -23,11 +22,12 @@ defaults:
2322 shell : bash
2423
2524jobs :
26- build-and-test :
25+ build :
26+ name : Cabal ${{ matrix.os }}
2727 runs-on : ${{ matrix.os }}
2828 strategy :
2929 fail-fast : false
30- matrix : { os: [macos-latest, windows-latest] }
30+ matrix : { os: [macos-latest, ubuntu-latest, windows-latest] }
3131
3232 steps :
3333 - uses : actions/checkout@v4
4444 - name : Configure the build plan
4545 run : |
4646 cabal configure -O1 --enable-tests
47+ cabal build --dry-run
4748
4849 - name : Restore cached dependencies
49- uses : actions/cache/restore@v3
50+ uses : actions/cache/restore@v4
5051 id : cache
5152 env :
5253 key : ${{ runner.os }}-cabal-${{ steps.setup-haskell.outputs.cabal-version }}-ghc-${{ steps.setup-haskell.outputs.ghc-version }}
6263 cabal build --only-dependencies
6364
6465 - name : Cache dependencies
65- uses : actions/cache/save@v3
66- if : ${{ steps.cache.outputs.cache-hit != 'true' }}
66+ uses : actions/cache/save@v4
67+ if : always() && steps.cache.outputs.cache-hit != 'true'
6768 with :
6869 path : ${{ steps.setup-haskell.outputs.cabal-store }}
6970 key : ${{ steps.cache.outputs.cache-primary-key }}
7273 run : |
7374 cabal build
7475
75- - name : Test
76+ - name : Test non-interactive
77+ run : |
78+ cabal test --test-show-details=direct
79+
80+ - name : Test --interactive
81+ run : |
82+ cabal test --test-show-details=direct --test-options=--interactive
83+
84+ - name : Test --accept
7685 run : |
77- cabal test --test-show-details=direct --test-options=-i
86+ cabal test --test-show-details=direct --test-options=--accept
0 commit comments