Skip to content

Commit

Permalink
Merge pull request #469 from ennru/travis-stages
Browse files Browse the repository at this point in the history
  • Loading branch information
octonato authored May 25, 2020
2 parents be59c87 + 341d520 commit d0476cb
Show file tree
Hide file tree
Showing 2 changed files with 53 additions and 11 deletions.
60 changes: 49 additions & 11 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,22 +1,60 @@
version: ~> 1.0

language: scala

git:
depth: false # Avoid sbt-dynver not seeing the tag

env:
- TRAVIS_JDK=8
- TRAVIS_JDK=11

scala:
- 2.12.10
- 2.13.1

before_install: curl -Ls https://raw.githubusercontent.com/shyiko/jabba/0.11.2/install.sh | bash && . ~/.jabba/jabba.sh
install: jabba install "adopt@~1.$TRAVIS_JDK.0-0" && jabba use "$_" && java -Xmx32m -version

script:
- sbt -DscalaJSStage=full ++$TRAVIS_SCALA_VERSION validateCode test mimaReportBinaryIssues publishLocal
- sbt ++$TRAVIS_SCALA_VERSION docs/test docs/validateDocs
jobs:
include:
- stage: check
name: "Code style check. Run locally with: sbt validateCode mimaReportBinaryIssues docs/validateDocs"
script: sbt validateCode mimaReportBinaryIssues docs/validateDocs
env:
- TRAVIS_SCALA_VERSION=2.13.1
- TRAVIS_JDK=11

- stage: test
name: "Run tests with Scala 2.12 and AdoptOpenJDK 11"
script: scripts/test-code.sh
env:
- TRAVIS_SCALA_VERSION=2.12.10
- 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

- name: "Run tests with Scala 2.12 and AdoptOpenJDK 8"
script: scripts/test-code.sh
env:
- TRAVIS_SCALA_VERSION=2.12.10
- 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: publish
name: "TEMPORARY, will become Publish artifacts to Bintray"
script: sbt +mimaReportBinaryIssues
env:
- TRAVIS_SCALA_VERSION=2.13.1
- TRAVIS_JDK=11

stages:
- name: check
- name: test
- name: publish
# if: ((branch = master AND type = push) OR (tag IS present)) AND NOT fork


cache:
directories:
Expand Down
4 changes: 4 additions & 0 deletions scripts/test-code.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
#!/usr/bin/env bash

sbt -DscalaJSStage=full ++$TRAVIS_SCALA_VERSION test publishLocal || exit 1
sbt ++$TRAVIS_SCALA_VERSION docs/test || exit 1

0 comments on commit d0476cb

Please sign in to comment.