# Use container-based infrastructure
sudo: false

language: scala

# These directories are cached to S3 at the end of the build
cache:
  directories:
    - $HOME/.ivy2/cache
    - $HOME/.sbt

before_cache:
  # Cleanup the cached directories to avoid unnecessary cache updates
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
  - find $HOME/.sbt        -name "*.lock"               -print -delete

scala:
  - 2.12.10
  - 2.13.1

jdk:
  - openjdk11

stages:
  - validations
  - test

jobs:
  include:
    - stage: validations
      script: scripts/validate-code check
      name: "Code validations for source formatting"
    - stage: test
      script: sbt clean coverage test
      name: "Run coverage tests"

after_success:
  - sbt coverageReport codacyCoverage coveralls

# Use container-based infrastructure
sudo: false

language: scala

# These directories are cached to S3 at the end of the build
cache:
  directories:
    - $HOME/.cache/coursier
    - $HOME/.ivy2/cache
    - $HOME/.sbt

before_cache:
  - rm -fv $HOME/.ivy2/.sbt.ivy.lock
  # Cleanup the cached directories to avoid unnecessary cache updates
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -print -delete
  - find $HOME/.sbt        -name "*.lock"               -print -delete

scala:
  - 2.12.10
  - 2.13.1

jdk:
  - openjdk11

stages:
  - validations
  - test

jobs:
  include:
    - stage: validations
      script: scripts/validate-code check
      name: "Code validations for source formatting"
    - stage: test
      script: sbt clean coverage test
      name: "Run coverage tests"

after_success:
  - sbt coverageReport codacyCoverage coveralls

Set up caching for coursier on Travis
Set up caching for coursier on Travis

Ref. https://www.scala-sbt.org/1.x/docs/Travis-CI-with-sbt.html#Caching
