From 887dc380d993b58904933ec705a9c43537c0f942 Mon Sep 17 00:00:00 2001 From: Jens Kat Date: Wed, 2 Oct 2019 22:34:55 +0200 Subject: [PATCH 1/5] Enable scoverage in 2.13 build Beware of 2.13.1 issue regarding https://github.com/scoverage/sbt-scoverage/issues/295 --- build.sbt | 7 +------ 1 file changed, 1 insertion(+), 6 deletions(-) diff --git a/build.sbt b/build.sbt index 91cefb329b..f9a15ee84f 100644 --- a/build.sbt +++ b/build.sbt @@ -6,12 +6,7 @@ import scala.xml.transform.{RewriteRule, RuleTransformer} import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType} lazy val scoverageSettings = Seq( - coverageEnabled := { - if (priorTo2_13(scalaVersion.value)) - coverageEnabled.value - else - false - }, + coverageEnabled := coverageEnabled.value, coverageMinimum := 60, coverageFailOnMinimum := false, coverageHighlighting := true From 909f1c634361bef0a6372318ecf61b1bd1aecaf2 Mon Sep 17 00:00:00 2001 From: Jens Kat Date: Wed, 2 Oct 2019 22:35:08 +0200 Subject: [PATCH 2/5] Enable apidoc generation for 2.13 --- build.sbt | 6 +----- 1 file changed, 1 insertion(+), 5 deletions(-) diff --git a/build.sbt b/build.sbt index f9a15ee84f..4a61973c1e 100644 --- a/build.sbt +++ b/build.sbt @@ -72,11 +72,7 @@ lazy val commonSettings = commonScalaVersionSettings ++ Seq( val unchanged = doctestGenTests.value if (priorTo2_13(scalaVersion.value)) unchanged else Nil }, - // TODO: re-enable disable scaladoc on 2.13 due to https://github.com/scala/bug/issues/11045 - sources in (Compile, doc) := { - val docSource = (sources in (Compile, doc)).value - if (priorTo2_13(scalaVersion.value)) docSource else Nil - } + sources in (Compile, doc) := (sources in (Compile, doc)).value ) ++ warnUnusedImport def macroDependencies(scalaVersion: String) = From 0b3214ef34a85f74ea3f5bd4e8c284a09fee9f8d Mon Sep 17 00:00:00 2001 From: Jens Kat Date: Tue, 8 Oct 2019 20:50:22 +0200 Subject: [PATCH 3/5] travis: Enable codecoverage for jvm build --- .travis.yml | 16 +++++----------- 1 file changed, 5 insertions(+), 11 deletions(-) diff --git a/.travis.yml b/.travis.yml index 92e6f82710..7d295bca7b 100644 --- a/.travis.yml +++ b/.travis.yml @@ -18,7 +18,7 @@ before_install: - export PATH=${PATH}:./vendor/bundle - if [[ ! -z "$HydraLicense" ]]; then mkdir -p /home/travis/.triplequote/metrics/config && echo "$HydraLicense" > "/home/travis/.triplequote/hydra.license" && cp hydra-metrics-service.conf /home/travis/.triplequote/metrics/config/metrics-service.conf; - fi + fi stages: - name: styling @@ -29,11 +29,6 @@ stages: jobs: include: # it can speed up the overall build to have the longer-running jobs at the top of this list. - - stage: test - env: TEST="coverage" - install: pip install --user codecov - script: sbt coverage buildJVM bench/test coverageReport && codecov - - stage: test env: TEST="JS tests" # http://austinpray.com/ops/2015/09/20/change-travis-node-version.html @@ -44,13 +39,12 @@ jobs: - &jvm_tests stage: test env: TEST="JVM tests" - script: sbt ++$TRAVIS_SCALA_VERSION! buildJVM bench/test + install: pip install --user codecov + script: sbt ++$TRAVIS_SCALA_VERSION! coverage buildJVM bench/test coverageReport && codecov scala: *scala_version_212 - <<: *jvm_tests scala: *scala_version_213 - # the bench module has dependencies not available in Scala 2.13, so don't test it - script: sbt ++$TRAVIS_SCALA_VERSION! buildJVM - + - stage: test env: TEST="docs" install: gem install jekyll -v 2.5 @@ -59,7 +53,7 @@ jobs: - stage: test env: TEST="scalafix" script: cd scalafix && sbt tests/test - + - stage: test env: TEST="binary compatibility" script: sbt ++$TRAVIS_SCALA_VERSION! validateBC From 58f3d5ff989ade27a656e80ae74182bd7d61017d Mon Sep 17 00:00:00 2001 From: Jens Kat Date: Wed, 9 Oct 2019 08:29:08 +0200 Subject: [PATCH 4/5] Add flag to codecov to differentiate scala versions --- .travis.yml | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/.travis.yml b/.travis.yml index 7d295bca7b..7965bb8dc0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -40,10 +40,13 @@ jobs: stage: test env: TEST="JVM tests" install: pip install --user codecov - script: sbt ++$TRAVIS_SCALA_VERSION! coverage buildJVM bench/test coverageReport && codecov + script: sbt ++$TRAVIS_SCALA_VERSION! coverage buildJVM bench/test coverageReport scala: *scala_version_212 + after_success: codecov -F scala_version_212 - <<: *jvm_tests scala: *scala_version_213 + after_success: codecov -F scala_version_213 + - stage: test env: TEST="docs" From 3e4d184a93678a0722652cd114703abd2fe07f4b Mon Sep 17 00:00:00 2001 From: Jens Kat Date: Wed, 9 Oct 2019 13:50:06 +0200 Subject: [PATCH 5/5] Remove sbt keys that do nothing --- build.sbt | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/build.sbt b/build.sbt index 4a61973c1e..a4643e40ff 100644 --- a/build.sbt +++ b/build.sbt @@ -6,7 +6,6 @@ import scala.xml.transform.{RewriteRule, RuleTransformer} import sbtcrossproject.CrossPlugin.autoImport.{crossProject, CrossType} lazy val scoverageSettings = Seq( - coverageEnabled := coverageEnabled.value, coverageMinimum := 60, coverageFailOnMinimum := false, coverageHighlighting := true @@ -71,8 +70,7 @@ lazy val commonSettings = commonScalaVersionSettings ++ Seq( doctestGenTests := { val unchanged = doctestGenTests.value if (priorTo2_13(scalaVersion.value)) unchanged else Nil - }, - sources in (Compile, doc) := (sources in (Compile, doc)).value + } ) ++ warnUnusedImport def macroDependencies(scalaVersion: String) =