aboutsummaryrefslogtreecommitdiff
path: root/.github/workflows
diff options
context:
space:
mode:
authorSteve Hart <steve@stevehart.net>2022-03-25 15:43:50 -0400
committerGitHub <noreply@github.com>2022-03-25 20:43:50 +0100
commit53244da3330ada568f80e2a07b4c6fe7268c91fc (patch)
tree5ec71e69855571ea7b89a342e6078ad2a6c289ca /.github/workflows
parente187816f64f0c54dc924f8283fe4c75a6e1f67b2 (diff)
Fix CI (#1467)
* CI: Reinstall GHC with docs CI tests were failing because the GHC preinstalled to the CI environment does not include documentation, which is required for running the Haddock tests. This commit causes the CI workflow to reinstall GHC with docs so that tests can succeed.
Diffstat (limited to '.github/workflows')
-rw-r--r--.github/workflows/ci.yml15
1 files changed, 12 insertions, 3 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index 9268c6b7..c147cbdc 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -19,7 +19,6 @@ jobs:
steps:
- uses: actions/checkout@v2
- if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/ghc-9.2'
- uses: haskell/actions/setup@v1
id: setup-haskell-cabal
@@ -28,9 +27,19 @@ jobs:
ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }}
- - name: Prepare environment
- run: echo "$HOME/.ghcup/bin" >> $GITHUB_PATH
+ # GitHub preinstalls recent GHC versions, and haskell/actions/setup uses the
+ # preinstalled version when possible. However, GitHub's preinstalled GHC does
+ # not include documentation, and we need documentation to run Haddock tests.
+ # Therefore, we reinstall GHC to ensure that we have the documentation we
+ # need.
+ # TODO: Only reinstall GHC when the docs are actually missing. (If we're
+ # using a GHC version that is not preinstalled by GitHub, then we will be
+ # using a GHC installed by ghcup, which should have documentation.)
+ - name: Reinstall GHC with docs
+ run: |
+ ghcup rm ghc ${{ matrix.ghc }}
+ ghcup install ghc ${{ matrix.ghc }}
- name: Freeze
run: |