]> git.immae.eu Git - github/fretlink/hmacaroons.git/blobdiff - .travis.yml
Add ~/.cabal/bin to PATH
[github/fretlink/hmacaroons.git] / .travis.yml
index 6866f86e9ccc2c0e357be04e9b4b385c2b492229..e30975be4ecb780828c756aed98d462e3ced14b7 100644 (file)
@@ -2,7 +2,13 @@
 language: c
 sudo: false
 
-
+notifications:
+  webhooks:
+    urls:
+      - https://webhooks.gitter.im/e/5dfabef9855765e0c386
+    on_success: change
+    on_failure: always
+    on_start: never
 
 cache:
   directories:
@@ -15,10 +21,10 @@ before_cache:
 
 matrix:
   include:
-    - env: CABALVER=1.18 GHCVER=7.8.4
+    - env: CABALVER=1.18 GHCVER=7.8.4 PUSH_DOCS=false
       compiler: ": #GHC 7.8.4"
       addons: {apt: {packages: [cabal-install-1.18,ghc-7.8.4], sources: [hvr-ghc]}}
-    - env: CABALVER=1.22 GHCVER=7.10.2
+    - env: CABALVER=1.22 GHCVER=7.10.2 PUSH_DOCS=true
       compiler: ": #GHC 7.10.2"
       addons: {apt: {packages: [cabal-install-1.22,ghc-7.10.2], sources: [hvr-ghc]}}
 
@@ -29,7 +35,7 @@ env:
 
 before_install:
  - unset CC
- - export PATH=/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
+ - export PATH=$HOME/.cabal/bin:/opt/ghc/$GHCVER/bin:/opt/cabal/$CABALVER/bin:$PATH
 
 install:
  - cabal --version
@@ -71,13 +77,13 @@ install:
 # any command which exits with a non-zero exit code causes the build to fail.
 script:
  - if [ -f configure.ac ]; then autoreconf -i; fi
- - cabal configure --enable-tests --enable-benchmarks -v2  # -v2 provides useful information for debugging
+ - cabal install hpc-coveralls --constraint=retry==0.6
+ - cabal configure --enable-tests --enable-benchmarks -v2 --enable-coverage  # -v2 provides useful information for debugging
  - cabal build   # this builds all libraries and executables (including tests/benchmarks)
- - cabal test
+ - run-cabal-test test
  - cabal check
  - cabal sdist   # tests that a source-distribution can be generated
 
- - bash ./scripts/pushdoc.sh
 
 # Check that the resulting source distribution can be built & installed.
 # If there are no other `.tar.gz` files in `dist`, this can be even simpler:
@@ -85,6 +91,10 @@ script:
  - SRC_TGZ=$(cabal info . | awk '{print $2;exit}').tar.gz &&
    (cd dist && cabal install --force-reinstalls "$SRC_TGZ")
 
+after_script:
+ - if [ true = $PUSH_DOCS ]; then bash ./scripts/pushdoc.sh; fi
+ - hpc-coveralls test
+
 
 
 # EOF