diff --git a/.travis.yml b/.travis.yml index dd4e3737..ced8f8a0 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,23 +1,62 @@ language: scala -scala: - - 2.10.7 - - 2.12.10 - - 2.13.1 git: depth: false # Avoid sbt-dynver not seeing the tag env: - - TRAVIS_JDK=8 - TRAVIS_JDK=11 before_install: curl -Ls https://git.io/jabba | bash && . ~/.jabba/jabba.sh install: jabba install "adopt@~1.$TRAVIS_JDK.0-0" && jabba use "$_" && java -Xmx32m -version -script: - - ./scripts/test-code.sh - - ./scripts/validate-code.sh - - ./scripts/validate-docs.sh +jobs: + include: + - stage: validations + script: scripts/validate-code.sh + name: "Code validations (headerCheck, scalafmt, mima)" + + - stage: test-jdk11 + name: "Run tests with Scala 2.10 and AdoptOpenJDK 11" + script: scripts/test-code.sh + env: + - TRAVIS_SCALA_VERSION=2.10.7 + - TRAVIS_JDK=11 + + - name: "Run tests with Scala 2.12 and AdoptOpenJDK 11" + script: scripts/test-code.sh + env: + - TRAVIS_SCALA_VERSION=2.12.11 + - TRAVIS_JDK=11 + + - name: "Run tests with Scala 2.13 and AdoptOpenJDK 11" + script: scripts/test-code.sh + env: + - TRAVIS_SCALA_VERSION=2.13.1 + - TRAVIS_JDK=11 + + - stage: test-jdk8 + name: "Run tests with Scala 2.10 and AdoptOpenJDK 8" + script: scripts/test-code.sh + env: + - TRAVIS_SCALA_VERSION=2.10.7 + - TRAVIS_JDK=8 + + - name: "Run tests with Scala 2.12 and AdoptOpenJDK 8" + script: scripts/test-code.sh + env: + - TRAVIS_SCALA_VERSION=2.12.11 + - TRAVIS_JDK=8 + + - name: "Run tests with Scala 2.13 and AdoptOpenJDK 8" + script: scripts/test-code.sh + env: + - TRAVIS_SCALA_VERSION=2.13.1 + - TRAVIS_JDK=8 + + + - stage: docs + script: scripts/validate-docs.sh + name: "Validate documentation" cache: directories: diff --git a/scripts/test-code.sh b/scripts/test-code.sh index f24fdb53..97337724 100755 --- a/scripts/test-code.sh +++ b/scripts/test-code.sh @@ -1,4 +1,6 @@ #!/usr/bin/env bash -sbt "++ $TRAVIS_SCALA_VERSION test" || travis_terminate 1 -sbt +publishLocal plugin/test plugin/scripted || travis_terminate 1 \ No newline at end of file +# Copyright (C) 2009-2019 Lightbend Inc. + +sbt "++ $TRAVIS_SCALA_VERSION test" || exit 1 +sbt +publishLocal plugin/test plugin/scripted || exit 1 \ No newline at end of file diff --git a/scripts/validate-code.sh b/scripts/validate-code.sh index 49e47eec..e57b6abc 100755 --- a/scripts/validate-code.sh +++ b/scripts/validate-code.sh @@ -1,4 +1,5 @@ #!/usr/bin/env bash -sbt ++$TRAVIS_SCALA_VERSION validateCode || travis_terminate 1 -sbt "++$TRAVIS_SCALA_VERSION mimaReportBinaryIssues" || travis_terminate 1 +# Copyright (C) 2009-2019 Lightbend Inc. + +sbt ";+validateCode;+mimaReportBinaryIssues" || exit 1 diff --git a/scripts/validate-docs.sh b/scripts/validate-docs.sh index d1caffc2..6daa27b7 100755 --- a/scripts/validate-docs.sh +++ b/scripts/validate-docs.sh @@ -1,5 +1,7 @@ #!/usr/bin/env bash -pushd docs || travis_terminate 1 - sbt evaluateSbtFiles validateDocs headerCheck test:headerCheck test || travis_terminate 1 +# Copyright (C) 2009-2019 Lightbend Inc. + +pushd docs || exit 1 + sbt evaluateSbtFiles validateDocs headerCheck test:headerCheck test || exit 1 popd