Skip to content

Commit

Permalink
test: track code coverage
Browse files Browse the repository at this point in the history
closes #494
  • Loading branch information
vlsi committed Jan 17, 2016
1 parent aea9383 commit 0f979c3
Show file tree
Hide file tree
Showing 4 changed files with 30 additions and 10 deletions.
16 changes: 12 additions & 4 deletions .travis.yml
Expand Up @@ -44,7 +44,9 @@ matrix:
- jdk: oraclejdk8 - jdk: oraclejdk8
addons: addons:
postgresql: "9.4" postgresql: "9.4"
env: PG_VERSION=9.4 env:
- PG_VERSION=9.4
- COVERAGE=Y
- jdk: openjdk7 - jdk: openjdk7
addons: addons:
postgresql: "9.4" postgresql: "9.4"
Expand All @@ -60,7 +62,9 @@ matrix:
- jdk: openjdk7 - jdk: openjdk7
addons: addons:
postgresql: "9.3" postgresql: "9.3"
env: PG_VERSION=9.3 env:
- PG_VERSION=9.3
- COVERAGE=Y
- jdk: openjdk6 - jdk: openjdk6
addons: addons:
postgresql: "9.3" postgresql: "9.3"
Expand All @@ -76,11 +80,15 @@ matrix:
- jdk: openjdk6 - jdk: openjdk6
addons: addons:
postgresql: "9.2" postgresql: "9.2"
env: PG_VERSION=9.2 env:
- PG_VERSION=9.2
- COVERAGE=Y
- jdk: oraclejdk8 - jdk: oraclejdk8
addons: addons:
postgresql: "9.1" postgresql: "9.1"
env: PG_VERSION=9.1 env:
- PG_VERSION=9.1
- COVERAGE=Y
- jdk: openjdk7 - jdk: openjdk7
addons: addons:
postgresql: "9.1" postgresql: "9.1"
Expand Down
2 changes: 1 addition & 1 deletion pgjdbc/pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.postgresql</groupId> <groupId>org.postgresql</groupId>
<artifactId>pgjdbc-core-parent</artifactId> <artifactId>pgjdbc-core-parent</artifactId>
<version>1.0.2</version> <version>1.0.4</version>
<relativePath/> <relativePath/>
</parent> </parent>


Expand Down
2 changes: 1 addition & 1 deletion pom.xml
Expand Up @@ -5,7 +5,7 @@
<parent> <parent>
<groupId>org.postgresql</groupId> <groupId>org.postgresql</groupId>
<artifactId>pgjdbc-versions</artifactId> <artifactId>pgjdbc-versions</artifactId>
<version>1.0.2</version> <version>1.0.4</version>
</parent> </parent>


<artifactId>pgjdbc-aggregate</artifactId> <artifactId>pgjdbc-aggregate</artifactId>
Expand Down
20 changes: 16 additions & 4 deletions travis_build.sh
Expand Up @@ -3,21 +3,33 @@ set -x -e


# Build project # Build project
MVN_ARGS="clean package -B -V" MVN_ARGS="clean package -B -V"
MVN_PROFILES="release"

if [[ "${COVERAGE}" == *"Y"* ]];
then
MVN_PROFILES="$MVN_PROFILES,coverage"
fi


if [[ "${TRAVIS_JDK_VERSION}" == *"jdk6"* ]]; if [[ "${TRAVIS_JDK_VERSION}" == *"jdk6"* ]];
then then
git clone --depth=50 https://github.com/pgjdbc/pgjdbc-jre6.git pgjdbc-jre6 git clone --depth=50 https://github.com/pgjdbc/pgjdbc-jre6.git pgjdbc-jre6
cd pgjdbc-jre6 cd pgjdbc-jre6
mvn ${MVN_ARGS} -P release,skip-unzip-jdk mvn ${MVN_ARGS} -P ${MVN_PROFILES},skip-unzip-jdk
elif [[ "${TRAVIS_JDK_VERSION}" == *"jdk7"* ]]; elif [[ "${TRAVIS_JDK_VERSION}" == *"jdk7"* ]];
then then
git clone --depth=50 https://github.com/pgjdbc/pgjdbc-jre7.git pgjdbc-jre7 git clone --depth=50 https://github.com/pgjdbc/pgjdbc-jre7.git pgjdbc-jre7
cd pgjdbc-jre7 cd pgjdbc-jre7
mvn ${MVN_ARGS} -P release,skip-unzip-jdk mvn ${MVN_ARGS} -P ${MVN_PROFILES},skip-unzip-jdk
elif [ "${PG_VERSION}" == "9.4" ]; elif [ "${PG_VERSION}" == "9.4" ];
then then
# Build javadocs for Java 8 and PG 9.4 only # Build javadocs for Java 8 and PG 9.4 only
mvn ${MVN_ARGS} -P release-artifacts,release mvn ${MVN_ARGS} -P ${MVN_PROFILES},release-artifacts
else else
mvn ${MVN_ARGS} -P release mvn ${MVN_ARGS} -P ${MVN_PROFILES}
fi

if [[ "${COVERAGE}" == "Y" ]];
then
pip install --user codecov
codecov
fi fi

0 comments on commit 0f979c3

Please sign in to comment.