Skip to content

Commit

Permalink
Enable coverage and docs (#3096)
Browse files Browse the repository at this point in the history
* Enable scoverage in 2.13 build

Beware of 2.13.1 issue regarding scoverage/sbt-scoverage#295

* Enable apidoc generation for 2.13

* travis: Enable codecoverage for jvm build

* Add flag to codecov to differentiate scala versions

* Remove sbt keys that do nothing
  • Loading branch information
DieBauer authored and kailuowang committed Oct 11, 2019
1 parent ca591fc commit c8b2f4e
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 22 deletions.
19 changes: 8 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand All @@ -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

- &js_tests
stage: test
env: TEST="JS tests"
Expand All @@ -47,13 +42,15 @@ 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
scala: *scala_version_212
after_success: codecov -F 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
after_success: codecov -F scala_version_213


- stage: test
env: TEST="docs"
install: gem install jekyll -v 2.5
Expand All @@ -62,7 +59,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
Expand Down
11 changes: 0 additions & 11 deletions build.sbt
Original file line number Diff line number Diff line change
Expand Up @@ -6,12 +6,6 @@ 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
},
coverageMinimum := 60,
coverageFailOnMinimum := false,
coverageHighlighting := true
Expand Down Expand Up @@ -74,11 +68,6 @@ lazy val commonSettings = commonScalaVersionSettings ++ Seq(
doctestGenTests := {
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
}
) ++ warnUnusedImport

Expand Down

0 comments on commit c8b2f4e

Please sign in to comment.