[commit: packages/deepseq] travis-tests: Run tests on Travis (9a4bed7)

git at git.haskell.org git at git.haskell.org
Wed Jul 19 21:58:55 UTC 2017


Repository : ssh://git@git.haskell.org/deepseq

On branch  : travis-tests
Link       : http://git.haskell.org/packages/deepseq.git/commitdiff/9a4bed7191a845ab5397c1f5a2be08914568bf1c

>---------------------------------------------------------------

commit 9a4bed7191a845ab5397c1f5a2be08914568bf1c
Author: Ryan Scott <ryan.gl.scott at gmail.com>
Date:   Wed Oct 19 19:32:10 2016 -0400

    Run tests on Travis


>---------------------------------------------------------------

9a4bed7191a845ab5397c1f5a2be08914568bf1c
 .travis.yml   | 9 ++++++---
 deepseq.cabal | 2 +-
 2 files changed, 7 insertions(+), 4 deletions(-)

diff --git a/.travis.yml b/.travis.yml
index 1ff0ad3..90c067f 100644
--- a/.travis.yml
+++ b/.travis.yml
@@ -85,7 +85,8 @@ install:
    fi
  - travis_retry cabal update -v
  - sed -i 's/^jobs:/-- jobs:/' ${HOME}/.cabal/config
- - cabal install --only-dependencies --dry -v > installplan.txt
+   # can't use "cabal install --only-dependencies --enable-tests" due to dep-cycle
+ - cabal install 'test-framework == 0.8.*' 'test-framework-hunit == 0.3.*' 'HUnit >= 1.2 && < 1.6' --dry -v > installplan.txt
  - sed -i -e '1,/^Resolving /d' installplan.txt; cat installplan.txt
 
 # check whether current requested install-plan matches cached package-db snapshot
@@ -99,7 +100,8 @@ install:
      echo "cabal build-cache MISS";
      rm -rf $HOME/.cabsnap;
      mkdir -p $HOME/.ghc $HOME/.cabal/lib $HOME/.cabal/share $HOME/.cabal/bin;
-     cabal install --only-dependencies;
+     # can't use "cabal install --only-dependencies --enable-tests" due to dep-cycle
+     cabal install 'test-framework == 0.8.*' 'test-framework-hunit == 0.3.*' 'HUnit >= 1.2 && < 1.6';
    fi
 
 # snapshot package-db on cache miss
@@ -115,9 +117,10 @@ 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 -v2  # -v2 provides useful information for debugging
+ - cabal configure --enable-tests -v2  # -v2 provides useful information for debugging
  - cabal build   # this builds all libraries and executables (including tests/benchmarks)
  - cabal sdist   # tests that a source-distribution can be generated
+ - cabal test
 
 # 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:
diff --git a/deepseq.cabal b/deepseq.cabal
index 849c7db..7590fcd 100644
--- a/deepseq.cabal
+++ b/deepseq.cabal
@@ -93,4 +93,4 @@ test-suite deepseq-generics-tests
         -- end of packages with inherited version constraints
         test-framework == 0.8.*,
         test-framework-hunit == 0.3.*,
-        HUnit >= 1.2 && < 1.4
+        HUnit >= 1.2 && < 1.6



More information about the ghc-commits mailing list