aboutsummaryrefslogtreecommitdiff
path: root/.github
diff options
context:
space:
mode:
authorAlexander Biehl <alexbiehl@gmail.com>2020-12-08 23:08:23 +0100
committerGitHub <noreply@github.com>2020-12-08 23:08:23 +0100
commit1dbbe6cd32c609fce0857cc77ef367820eb88359 (patch)
treef830f87cc99cb0b18f880fb4ca130bfc66789117 /.github
parentc4291bfc06211c9f60c9d43b4ada5c75ab8b41f8 (diff)
Move to GitHub CI (#1266)
* Initial version of ci.yml This is a straight copy from Dmitrii Kovanikov's blog post at https://kodimensional.dev/github-actions. Will adapt to haddock in successive commits. * Delete .travis.yml * Modify to only test on ghc-8.10.{1,2} * Use actions/setup-haskell@v1.1.4 * Relax QuickCheck bound on haddock-api * Remove stack matrix for now * Nail down to ghc-8.10 branch for now * Pin index state to 2020-12-08T20:13:44Z for now * Disable macOS and Windows tests for now for speed up
Diffstat (limited to '.github')
-rw-r--r--.github/workflows/ci.yml49
1 files changed, 49 insertions, 0 deletions
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
new file mode 100644
index 00000000..d5b1bae2
--- /dev/null
+++ b/.github/workflows/ci.yml
@@ -0,0 +1,49 @@
+name: CI
+
+# Trigger the workflow on push or pull request, but only for the master branch
+on:
+ pull_request:
+ push:
+ branches: ["ghc-8.10"]
+
+jobs:
+ cabal:
+ name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
+ runs-on: ${{ matrix.os }}
+ strategy:
+ matrix:
+ os: [ubuntu-latest]
+ cabal: ["3.2"]
+ ghc:
+ - "8.10.1"
+ - "8.10.2"
+
+ steps:
+ - uses: actions/checkout@v2
+ if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/ghc-8.10'
+
+ - uses: actions/setup-haskell@v1.1.4
+ id: setup-haskell-cabal
+ name: Setup Haskell
+ with:
+ ghc-version: ${{ matrix.ghc }}
+ cabal-version: ${{ matrix.cabal }}
+
+ - name: Freeze
+ run: |
+ cabal freeze
+
+ - uses: actions/cache@v1
+ name: Cache ~/.cabal/store
+ with:
+ path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
+ key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
+
+ - name: Build
+ run: |
+ cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
+ cabal build all
+
+ - name: Test
+ run: |
+ cabal test all