diff --git a/.travis.yml b/.travis.yml index e70eee6..04d3ba9 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,17 +1,17 @@ language: d sudo: false -d: - - dmd-2.064.2 - - dmd-2.065.0 - - dmd-2.066.1 - - dmd-2.067.0 - - ldc-0.14.0 - - ldc-0.15.1 - - gdc-4.9.0 +matrix: + include: + - d: dmd-2.064.2 + - d: dmd-2.065.0 + - d: dmd-2.066.1 + env: + - COVERAGE=true + - d: dmd-2.067.0 + - d: ldc-0.14.0 + - d: ldc-0.15.1 + - d: gdc-4.9.0 script: - - dub test --compiler=${DC} -c library-nonet - - dub build --compiler=${DC} - - ./build.sh - - DUB=`pwd`/bin/dub COMPILER=${DC} test/run-unittest.sh + - ./travis-ci.sh diff --git a/README.md b/README.md index de6ff58..5245bb2 100644 --- a/README.md +++ b/README.md @@ -1,4 +1,4 @@ -# dub package manager [![Build Status](https://travis-ci.org/D-Programming-Language/dub.png)](https://travis-ci.org/D-Programming-Language/dub) +# dub package manager [![Build Status](https://travis-ci.org/D-Programming-Language/dub.png)](https://travis-ci.org/D-Programming-Language/dub) [![Coverage Status](https://coveralls.io/repos/D-Programming-Language/dub/badge.svg)](https://coveralls.io/r/D-Programming-Language/dub) Package and build manager for [D](http://dlang.org/) applications and libraries. diff --git a/travis-ci.sh b/travis-ci.sh new file mode 100755 index 0000000..e1363d7 --- /dev/null +++ b/travis-ci.sh @@ -0,0 +1,19 @@ +#!/bin/bash + +set -e -o pipefail + +dub test --compiler=${DC} -c library-nonet + +if [ "$COVERAGE" = true ]; then + # library-nonet fails to build with coverage (Issue 13742) + dub test --compiler=${DC} -b unittest-cov + ./build.sh -cov +else + ./build.sh +fi +DUB=`pwd`/bin/dub COMPILER=${DC} test/run-unittest.sh + +if [ "$COVERAGE" = true ]; then + dub fetch doveralls --version=~master + dub run doveralls --compiler=${DC} +fi