git.iko.soy/typeable/servant
on master help sign in
Update travis.yml for merged repos
commit7351c072bd60f98de69677e0d78b4fa9bb69904b authorJulian K. Arni <jkarni@gmail.com> dateMon 20 Apr 2015, 11:57 (11 years ago) parent9da1f6e
2 files changed+43−18
.travis.yml+1−18 scripts/test-all.sh+42
.travis.yml+1−18
@@ -3,25 +3,8 @@ language: haskell
33ghc:
44 - 7.8
55
6−before_install:
7− - cabal update
8− - cabal sandbox init
9−
10−install:
11− - cabal install --only-dependencies --enable-tests
12−
136script:
14− - cabal configure --enable-tests --enable-library-coverage && cabal build && cabal test
15− - cabal check
16− - cabal sdist
17−
18−after_script:
19− - |
20− if [ "$TRAVIS_PULL_REQUEST" -eq "$TRAVIS_PULL_REQUEST" ] 2>/dev/null || [ "$TRAVIS_BRANCH" == "master" ] ; then
21− cabal install hpc-coveralls
22− hpc-coveralls --exclude-dir=test spec doctests
23− fi
24−
7+ - ./scripts/test-all.sh
258
269notifications:
2710 irc:
scripts/test-all.shnew file+42
@@ -0,0 +1,42 @@
1+#!/bin/bash -
2+#===============================================================================
3+#
4+# FILE: test-all.sh
5+#
6+# USAGE: ./test-all.sh
7+#
8+# DESCRIPTION: Run tests for all source directories listed in $SOURCES.
9+# Uses local versions of those sources.
10+#
11+#===============================================================================
12+
13+set -o nounset
14+set -o errexit
15+
16+SOURCES=( servant servant-server servant-client servant-jquery servant-docs )
17+GHC_FLAGS="-Werror"
18+
19+prepare_sandbox () {
20+ cabal sandbox init
21+ for s in ${SOURCES[@]} ; do
22+ cd "$s"
23+ cabal sandbox init --sandbox=../
24+ cabal sandbox add-source .
25+ cd ..
26+ done
27+}
28+
29+test_each () {
30+ for s in ${SOURCES[@]} ; do
31+ echo "Testing $s..."
32+ cd "$s"
33+ cabal install --only-dependencies --enable-tests
34+ cabal configure --enable-tests --ghc-options="$GHC_FLAGS"
35+ cabal build
36+ cabal test
37+ cd ..
38+ done
39+}
40+
41+prepare_sandbox
42+test_each