diff --git a/.travis.yml b/.travis.yml index 9900eebfb3..f9f2b9e7b3 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,6 +39,10 @@ jobs: sed -i 's/\\n$//g' "$TESTS_FILES_PREFIX"* popd ./gradlew scalaStyle testScoverageClasses --parallel + - stage: 'compile helloworld project' + name: 'compile helloworld project' + script: | + cd helloworld && ./gradlew scalaStyle testScoverageClasses --parallel - stage: 'Build' name: 'Build Part 1' script: | @@ -68,3 +72,10 @@ jobs: echo -e "Test files running on this container : `eval $COUNT_TEST_FILE_CMD`\n$TEST_FILES\n" ./gradlew reportScoverage name: 'Build Part 4' + - script: | + export TEST_FILES=`cat "$BUILD_CACHE_DIR/$TESTS_FILES_PREFIX"03` + COUNT_TEST_FILE_CMD='echo $TEST_FILES | sort |tr " " "\n" | wc -l' + echo "Total test files : `eval $COUNT_TEST_FILE_CMD`" + echo -e "Test files running on this container : `eval $COUNT_TEST_FILE_CMD`\n$TEST_FILES\n" + cd helloworld && ./gradlew reportScoverage + name: 'Build Part 5 - helloworld' diff --git a/helloworld/build.gradle b/helloworld/build.gradle index 02c11f3e11..a1a2646157 100644 --- a/helloworld/build.gradle +++ b/helloworld/build.gradle @@ -10,6 +10,7 @@ buildscript { plugins { id 'com.github.johnrengelman.shadow' version '2.0.4' id 'com.commercehub.gradle.plugin.avro' version '0.8.0' + id 'org.scoverage' version '2.3.0' } repositories { jcenter() @@ -40,6 +41,7 @@ ext { scalatestVersion = '3.0.0' transmogrifaiVersion ='0.5.0' collectionsVersion = '3.2.2' + scoveragePluginVersion = '1.3.1' mainClassName = "com.salesforce.dummy.DummyMain" } @@ -53,6 +55,8 @@ configurations { dependencies { // Scala zinc 'com.typesafe.zinc:zinc:0.3.15' + scoverage "org.scoverage:scalac-scoverage-plugin_$scalaVersion:$scoveragePluginVersion" + scoverage "org.scoverage:scalac-scoverage-runtime_$scalaVersion:$scoveragePluginVersion" scalaLibrary "org.scala-lang:scala-library:$scalaVersion.$scalaVersionRevision" scalaCompiler "org.scala-lang:scala-compiler:$scalaVersion.$scalaVersionRevision" compile "org.scala-lang:scala-library:$scalaVersion.$scalaVersionRevision" @@ -74,6 +78,8 @@ dependencies { // Test testCompile "org.scalatest:scalatest_$scalaVersion:$scalatestVersion" testCompile "junit:junit:${junitVersion}" + testCompile "org.scoverage:scalac-scoverage-plugin_$scalaVersion:$scoveragePluginVersion" + testCompile "org.scoverage:scalac-scoverage-runtime_$scalaVersion:$scoveragePluginVersion" } configurations.all {