|
1 | | -name: Doctest |
2 | | - |
3 | | -on: |
4 | | - push: |
5 | | - branches: [main] |
6 | | - pull_request: |
7 | | - branches: [main] |
8 | | - |
9 | | -jobs: |
10 | | - build: |
11 | | - name: GHC ${{ matrix.ghc-version }} on ${{ matrix.os }} |
12 | | - runs-on: ${{ matrix.os }} |
13 | | - strategy: |
14 | | - fail-fast: false |
15 | | - matrix: |
16 | | - os: [ubuntu-latest] |
17 | | - ghc-version: ['9.8'] |
18 | | - |
19 | | - steps: |
20 | | - - uses: actions/checkout@v4 |
21 | | - |
22 | | - - name: Set up GHC ${{ matrix.ghc-version }} |
23 | | - uses: haskell-actions/setup@v2 |
24 | | - id: setup |
25 | | - with: |
26 | | - ghc-version: ${{ matrix.ghc-version }} |
27 | | - # Defaults, added for clarity: |
28 | | - cabal-version: 'latest' |
29 | | - cabal-update: true |
30 | | - |
31 | | - - name: Configure the build |
32 | | - run: | |
33 | | - cabal configure --enable-tests --enable-benchmarks --disable-documentation |
34 | | - cabal build all --dry-run |
35 | | - # The last step generates dist-newstyle/cache/plan.json for the cache key. |
36 | | - |
37 | | - - name: Restore cached dependencies |
38 | | - uses: actions/cache/restore@v4 |
39 | | - id: cache |
40 | | - env: |
41 | | - key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }} |
42 | | - with: |
43 | | - path: ${{ steps.setup.outputs.cabal-store }} |
44 | | - key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} |
45 | | - restore-keys: ${{ env.key }}- |
46 | | - |
47 | | - - name: Install dependencies |
48 | | - # If we had an exact cache hit, the dependencies will be up to date. |
49 | | - if: steps.cache.outputs.cache-hit != 'true' |
50 | | - run: cabal build all --only-dependencies |
51 | | - |
52 | | - # Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail. |
53 | | - - name: Save cached dependencies |
54 | | - uses: actions/cache/save@v4 |
55 | | - # If we had an exact cache hit, trying to save the cache would error because of key clash. |
56 | | - if: steps.cache.outputs.cache-hit != 'true' |
57 | | - with: |
58 | | - path: ${{ steps.setup.outputs.cabal-store }} |
59 | | - key: ${{ steps.cache.outputs.cache-primary-key }} |
60 | | - |
61 | | - - name: Build |
62 | | - run: cabal build all |
63 | | - |
64 | | - - name: Run tests |
65 | | - run: cabal test all |
66 | | - |
67 | | - - name: Run Doctest |
68 | | - # Note - Tests from Examples for functions that return randomized results are expected to fail |
69 | | - run: cabal install doctest --overwrite-policy=always && cabal build && cabal repl --build-depends=QuickCheck --build-depends=template-haskell --with-ghc=doctest |
| 1 | +# name: Doctest |
| 2 | +# |
| 3 | +# on: |
| 4 | +# push: |
| 5 | +# branches: [main] |
| 6 | +# pull_request: |
| 7 | +# branches: [main] |
| 8 | +# |
| 9 | +# jobs: |
| 10 | +# build: |
| 11 | +# name: GHC ${{ matrix.ghc-version }} on ${{ matrix.os }} |
| 12 | +# runs-on: ${{ matrix.os }} |
| 13 | +# strategy: |
| 14 | +# fail-fast: false |
| 15 | +# matrix: |
| 16 | +# os: [ubuntu-latest] |
| 17 | +# ghc-version: ['9.8'] |
| 18 | +# |
| 19 | +# steps: |
| 20 | +# - uses: actions/checkout@v4 |
| 21 | +# |
| 22 | +# - name: Set up GHC ${{ matrix.ghc-version }} |
| 23 | +# uses: haskell-actions/setup@v2 |
| 24 | +# id: setup |
| 25 | +# with: |
| 26 | +# ghc-version: ${{ matrix.ghc-version }} |
| 27 | +# # Defaults, added for clarity: |
| 28 | +# cabal-version: 'latest' |
| 29 | +# cabal-update: true |
| 30 | +# |
| 31 | +# - name: Configure the build |
| 32 | +# run: | |
| 33 | +# cabal configure --enable-tests --enable-benchmarks --disable-documentation |
| 34 | +# cabal build all --dry-run |
| 35 | +# # The last step generates dist-newstyle/cache/plan.json for the cache key. |
| 36 | +# |
| 37 | +# - name: Restore cached dependencies |
| 38 | +# uses: actions/cache/restore@v4 |
| 39 | +# id: cache |
| 40 | +# env: |
| 41 | +# key: ${{ runner.os }}-ghc-${{ steps.setup.outputs.ghc-version }}-cabal-${{ steps.setup.outputs.cabal-version }} |
| 42 | +# with: |
| 43 | +# path: ${{ steps.setup.outputs.cabal-store }} |
| 44 | +# key: ${{ env.key }}-plan-${{ hashFiles('**/plan.json') }} |
| 45 | +# restore-keys: ${{ env.key }}- |
| 46 | +# |
| 47 | +# - name: Install dependencies |
| 48 | +# # If we had an exact cache hit, the dependencies will be up to date. |
| 49 | +# if: steps.cache.outputs.cache-hit != 'true' |
| 50 | +# run: cabal build all --only-dependencies |
| 51 | +# |
| 52 | +# # Cache dependencies already here, so that we do not have to rebuild them should the subsequent steps fail. |
| 53 | +# - name: Save cached dependencies |
| 54 | +# uses: actions/cache/save@v4 |
| 55 | +# # If we had an exact cache hit, trying to save the cache would error because of key clash. |
| 56 | +# if: steps.cache.outputs.cache-hit != 'true' |
| 57 | +# with: |
| 58 | +# path: ${{ steps.setup.outputs.cabal-store }} |
| 59 | +# key: ${{ steps.cache.outputs.cache-primary-key }} |
| 60 | +# |
| 61 | +# - name: Build |
| 62 | +# run: cabal build all |
| 63 | +# |
| 64 | +# - name: Run tests |
| 65 | +# run: cabal test all |
| 66 | +# |
| 67 | +# - name: Run Doctest |
| 68 | +# # Note - Tests from Examples for functions that return randomized results are expected to fail |
| 69 | +# run: cabal install doctest --overwrite-policy=always && cabal build && cabal repl --build-depends=QuickCheck --build-depends=template-haskell --with-ghc=doctest |
0 commit comments