language: scala
jdk:
  - oraclejdk8
sbt_args: "-J-Xmx2G"
stages:
  - name: test
  - name: release
    if: (branch = master AND type = push) OR (tag IS present)
jobs:
  include:
    - env: TEST="scalafmt"
      script: ./scalafmt --test
    - env: TEST="+test"
      script: sbt +test
    - jdk: openjdk11
      env: TEST="+test"
      script: sbt +test
    - stage: release
      script: sbt ci-release

# Taken from https://github.com/typelevel/cats/blob/master/.travis.yml
cache:
  directories:
  - "travis_phantomjs"
  - $HOME/.sbt/0.13/dependency
  - $HOME/.sbt/boot/scala*
  - $HOME/.sbt/launchers
  - $HOME/.ivy2/cache
  - $HOME/.coursier
  - $HOME/.cache
  - $HOME/.nvm

before_cache:
  - du -h -d 1 $HOME/.ivy2/cache
  - du -h -d 2 $HOME/.sbt/
  - find $HOME/.sbt -name "*.lock" -type f -delete
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete


language: scala
jdk:
  - openjdk8
sbt_args: "-J-Xmx2G"
stages:
  - name: test
  - name: release
    if: (branch = master AND type = push) OR (tag IS present)
jobs:
  include:
    - env: TEST="scalafmt"
      script: ./scalafmt --test
    - env: TEST="+test"
      script: sbt +test
    - jdk: openjdk11
      env: TEST="+test"
      script: sbt +test
    - stage: release
      script: sbt ci-release

# Taken from https://github.com/typelevel/cats/blob/master/.travis.yml
cache:
  directories:
  - "travis_phantomjs"
  - $HOME/.sbt/0.13/dependency
  - $HOME/.sbt/boot/scala*
  - $HOME/.sbt/launchers
  - $HOME/.ivy2/cache
  - $HOME/.coursier
  - $HOME/.cache
  - $HOME/.nvm

before_cache:
  - du -h -d 1 $HOME/.ivy2/cache
  - du -h -d 2 $HOME/.sbt/
  - find $HOME/.sbt -name "*.lock" -type f -delete
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete


Switch to openjdk8 in Travis
Switch to openjdk8 in Travis
