Skip to content
This repository was archived by the owner on Aug 3, 2024. It is now read-only.

Commit 1dbbe6c

Browse files
authored
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
1 parent c4291bf commit 1dbbe6c

File tree

4 files changed

+53
-158
lines changed

4 files changed

+53
-158
lines changed

.github/workflows/ci.yml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
name: CI
2+
3+
# Trigger the workflow on push or pull request, but only for the master branch
4+
on:
5+
pull_request:
6+
push:
7+
branches: ["ghc-8.10"]
8+
9+
jobs:
10+
cabal:
11+
name: ${{ matrix.os }} / ghc ${{ matrix.ghc }}
12+
runs-on: ${{ matrix.os }}
13+
strategy:
14+
matrix:
15+
os: [ubuntu-latest]
16+
cabal: ["3.2"]
17+
ghc:
18+
- "8.10.1"
19+
- "8.10.2"
20+
21+
steps:
22+
- uses: actions/checkout@v2
23+
if: github.event.action == 'opened' || github.event.action == 'synchronize' || github.event.ref == 'refs/heads/ghc-8.10'
24+
25+
- uses: actions/setup-haskell@v1.1.4
26+
id: setup-haskell-cabal
27+
name: Setup Haskell
28+
with:
29+
ghc-version: ${{ matrix.ghc }}
30+
cabal-version: ${{ matrix.cabal }}
31+
32+
- name: Freeze
33+
run: |
34+
cabal freeze
35+
36+
- uses: actions/cache@v1
37+
name: Cache ~/.cabal/store
38+
with:
39+
path: ${{ steps.setup-haskell-cabal.outputs.cabal-store }}
40+
key: ${{ runner.os }}-${{ matrix.ghc }}-${{ hashFiles('cabal.project.freeze') }}
41+
42+
- name: Build
43+
run: |
44+
cabal configure --enable-tests --enable-benchmarks --test-show-details=direct
45+
cabal build all
46+
47+
- name: Test
48+
run: |
49+
cabal test all

.travis.yml

Lines changed: 0 additions & 157 deletions
This file was deleted.

cabal.project

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,3 +2,6 @@ packages: ./
22
./haddock-api
33
./haddock-library
44
./haddock-test
5+
6+
-- Pinning the index-state helps to make reasonably CI deterministic
7+
index-state: 2020-12-08T20:13:44Z

haddock-api/haddock-api.cabal

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -177,7 +177,7 @@ test-suite spec
177177
, haddock-library ^>= 1.9.0
178178
, xhtml ^>= 3000.2.2
179179
, hspec >= 2.4.4 && < 2.8
180-
, QuickCheck >= 2.11 && < 2.14
180+
, QuickCheck >= 2.11 && ^>= 2.14
181181

182182
-- Versions for the dependencies below are transitively pinned by
183183
-- the non-reinstallable `ghc` package and hence need no version

0 commit comments

Comments
 (0)