-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
54 lines (44 loc) · 1.21 KB
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
# Use Travis CI's container infrastructure to enable caching.
sudo: false
# "haskell" will set up the whole haskell-platform. We don't need that.
language: generic
services:
- postgresql
addons:
apt:
sources:
- hvr-ghc
packages:
- libgmp-dev
- ghc-8.0.1
env:
global:
- GHCVER=8.0.1
- STACK_ARGS="--no-terminal --skip-ghc-check"
before_install:
- mkdir -p $HOME/.local/bin
- export PATH=$HOME/.local/bin:/opt/ghc/$GHCVER/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
- echo $STACK_ARGS
- stack $STACK_ARGS setup
- stack $STACK_ARGS --version
- stack $STACK_ARGS ghc -- --version
install:
- cp secrets.m4.example secrets.m4
- make files
- stack $STACK_ARGS install hspec-discover
- stack $STACK_ARGS install --only-dependencies
before_script:
- psql -c 'create database betty_test;' -U postgres
script:
- export PGHOST=localhost
- export PGUSER=postgres
- export PGPASS=''
- export PGDATABASE=betty_test
- stack $STACK_ARGS test --coverage
after_script:
- stack hpc report betty
# Speed up subsequent builds using Stack caching.
cache:
directories:
- $HOME/.stack