Update the CI config.

main
Rob Rix 2020-07-13 11:15:11 -04:00
parent 63cd204413
commit 0fffc0ef74
No known key found for this signature in database
GPG Key ID: 2BE643E01DC032AE
1 changed files with 25 additions and 9 deletions

View File

@ -12,25 +12,41 @@ jobs:
cabal: ["latest"] cabal: ["latest"]
steps: steps:
- uses: actions/checkout@master - uses: actions/checkout@v2
if: github.event.action == 'opened' || github.event.action == 'synchronize' if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/master'
- uses: actions/setup-haskell@v1 - uses: actions/setup-haskell@v1.1.2
name: Setup Haskell name: Setup Haskell
with: with:
ghc-version: ${{ matrix.ghc }} ghc-version: ${{ matrix.ghc }}
cabal-version: ${{ matrix.cabal }} cabal-version: ${{ matrix.cabal }}
- uses: actions/cache@v1
name: Cache ~/.cabal/packages
with:
path: ~/.cabal/packages
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-packages
- uses: actions/cache@v1
name: Cache ~/.cabal/store
with:
path: ~/.cabal/store
key: ${{ runner.os }}-${{ matrix.ghc }}-cabal-store
- uses: actions/cache@v1
name: Cache dist-newstyle
with:
path: dist-newstyle
key: ${{ runner.os }}-${{ matrix.ghc }}-fused-effects-exceptions-dist
- name: Install dependencies - name: Install dependencies
run: | run: |
cabal v2-update cabal v2-update
cabal v2-configure --enable-tests --write-ghc-environment-files=always -j2 cabal v2-configure --project-file=cabal.project.ci --enable-tests --write-ghc-environment-files=always -j2
cabal v2-build --only-dependencies cabal v2-build --project-file=cabal.project.ci --only-dependencies all
- name: Build & test - name: Build & test
run: | run: |
cabal v2-build cabal v2-build --project-file=cabal.project.ci
cabal v2-test cabal v2-run --project-file=cabal.project.ci test
cabal v2-haddock cabal v2-haddock --project-file=cabal.project.ci
cabal v2-sdist cabal v2-sdist --project-file=cabal.project.ci
cabal check cabal check