-
Notifications
You must be signed in to change notification settings - Fork 10
/
.travis.yml
57 lines (56 loc) · 1.65 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
55
56
57
language: haskell
ghc:
- "8.6.1"
cabal: "2.4"
sudo: required
# Cache .stack for build_times--
before_cache:
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/build-reports.log
- rm -fv $HOME/.cabal/packages/hackage.haskell.org/00-index.tar
cache:
directories:
- $HOME/.stack
- $HOME/.cabsnap
- $HOME/.cabal/packages
env:
- PGPORT=5555
services:
- docker
before_script:
# Disable services enabled by default
# http://docs.travis-ci.com/user/database-setup/#MySQL
- sudo /etc/init.d/mysql stop
- sudo /etc/init.d/postgresql stop
before_install:
# Download and unpack the stack executable
- mkdir -p ~/.local/bin
- export PATH=$HOME/.local/bin:$PATH
- travis_retry curl -L https://www.stackage.org/stack/linux-x86_64 | tar xz --wildcards --strip-components=1 -C ~/.local/bin '*/stack'
# Set up node env
- nvm install lts/carbon
- nvm use lts/carbon
- nvm alias default lts/carbon
install:
# DEPLOY
- docker-compose up -d
- travis_wait make install
- sleep 10
- make compile-contracts
- make build-purs-strict
- travis_wait make deploy-contracts
# - make test-dapp
- PGPORT=5432 make migrate
# BUILD
- travis_wait 30 stack --skip-ghc-check setup
- travis_wait 30 stack --skip-ghc-check build
- travis_wait 30 stack --skip-ghc-check install hlint
- travis_wait 30 stack --skip-ghc-check install stylish-haskell
script:
- PGHOST=localhost make run-indexer &
- PGHOST=localhost make run-server &
- PGHOST=localhost make run-gql-server &
- make test-e2e
- make test-dapp
- make hlint
# When branch is `master` we run `haskell-stylish` and fail if git working directory becomes dirty
- if [ "$TRAVIS_BRANCH" == "master" ]; then make stylish && git diff-index --quiet HEAD; fi