language: scala
sudo: false

scala:
  - 2.12.13
  - 2.13.4

jdk: openjdk8

install:
  - . $HOME/.nvm/nvm.sh
  - nvm install 14
  - nvm use 14
  - export NODE_PATH="$(npm config get prefix)"/lib/node_modules
  - npm install
  - npm install jsdom source-map-support

script:
  - sbt ++$TRAVIS_SCALA_VERSION test:compile JS/test:fastOptJS JS/test:fullOptJS
  - sbt ++$TRAVIS_SCALA_VERSION test
  - sbt ++$TRAVIS_SCALA_VERSION 'set scalaJSStage in ThisBuild := FullOptStage' JS/test
  - sbt ++$TRAVIS_SCALA_VERSION cmpJsSize jsSizes

before_cache:
  - rm -f $HOME/.ivy2/.sbt.ivy.lock
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete
  - find $HOME/.sbt -name "*.lock" -type f -delete
cache:
  directories:
    - $HOME/.coursier
    - $HOME/.ivy2/cache
    - $HOME/.sbt


language: scala
sudo: false

scala:
  - 2.12.13
  - 2.13.4

jdk: openjdk11

install:
  - . $HOME/.nvm/nvm.sh
  - nvm install 14
  - nvm use 14
  - export NODE_PATH="$(npm config get prefix)"/lib/node_modules
  - npm install
  - npm install jsdom source-map-support

script:
  - sbt ++$TRAVIS_SCALA_VERSION test:compile JS/test:fastOptJS JS/test:fullOptJS
  - sbt ++$TRAVIS_SCALA_VERSION test
  - sbt ++$TRAVIS_SCALA_VERSION 'set scalaJSStage in ThisBuild := FullOptStage' JS/test
  - sbt ++$TRAVIS_SCALA_VERSION cmpJsSize jsSizes

before_cache:
  - rm -f $HOME/.ivy2/.sbt.ivy.lock
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete
  - find $HOME/.sbt -name "*.lock" -type f -delete
cache:
  directories:
    - $HOME/.coursier
    - $HOME/.ivy2/cache
    - $HOME/.sbt


Use Java 11 to avoid bug
CI: Use Java 11 to avoid bug

See https://github.com/scala-js/scala-js/issues/4031
