Update travis.yml for merged repos
This commit is contained in:
parent
9da1f6ef40
commit
7351c072bd
2 changed files with 43 additions and 18 deletions
19
.travis.yml
19
.travis.yml
|
@ -3,25 +3,8 @@ language: haskell
|
|||
ghc:
|
||||
- 7.8
|
||||
|
||||
before_install:
|
||||
- cabal update
|
||||
- cabal sandbox init
|
||||
|
||||
install:
|
||||
- cabal install --only-dependencies --enable-tests
|
||||
|
||||
script:
|
||||
- cabal configure --enable-tests --enable-library-coverage && cabal build && cabal test
|
||||
- cabal check
|
||||
- cabal sdist
|
||||
|
||||
after_script:
|
||||
- |
|
||||
if [ "$TRAVIS_PULL_REQUEST" -eq "$TRAVIS_PULL_REQUEST" ] 2>/dev/null || [ "$TRAVIS_BRANCH" == "master" ] ; then
|
||||
cabal install hpc-coveralls
|
||||
hpc-coveralls --exclude-dir=test spec doctests
|
||||
fi
|
||||
|
||||
- ./scripts/test-all.sh
|
||||
|
||||
notifications:
|
||||
irc:
|
||||
|
|
42
scripts/test-all.sh
Executable file
42
scripts/test-all.sh
Executable file
|
@ -0,0 +1,42 @@
|
|||
#!/bin/bash -
|
||||
#===============================================================================
|
||||
#
|
||||
# FILE: test-all.sh
|
||||
#
|
||||
# USAGE: ./test-all.sh
|
||||
#
|
||||
# DESCRIPTION: Run tests for all source directories listed in $SOURCES.
|
||||
# Uses local versions of those sources.
|
||||
#
|
||||
#===============================================================================
|
||||
|
||||
set -o nounset
|
||||
set -o errexit
|
||||
|
||||
SOURCES=( servant servant-server servant-client servant-jquery servant-docs )
|
||||
GHC_FLAGS="-Werror"
|
||||
|
||||
prepare_sandbox () {
|
||||
cabal sandbox init
|
||||
for s in ${SOURCES[@]} ; do
|
||||
cd "$s"
|
||||
cabal sandbox init --sandbox=../
|
||||
cabal sandbox add-source .
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
|
||||
test_each () {
|
||||
for s in ${SOURCES[@]} ; do
|
||||
echo "Testing $s..."
|
||||
cd "$s"
|
||||
cabal install --only-dependencies --enable-tests
|
||||
cabal configure --enable-tests --ghc-options="$GHC_FLAGS"
|
||||
cabal build
|
||||
cabal test
|
||||
cd ..
|
||||
done
|
||||
}
|
||||
|
||||
prepare_sandbox
|
||||
test_each
|
Loading…
Reference in a new issue