language: scala
scala:
- 2.12.3
jdk:
- openjdk8
sudo: false
cache:
  directories:
  - $HOME/.sbt
  - $HOME/.ivy2
before_cache:
  - find $HOME/.sbt -name "*.lock" -type f -delete -print
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete -print
before_install:
  - export PATH=${PATH}:./vendor/bundle
install:
  - rvm use 2.2.5 --install --fuzzy
  - gem update --system
  - gem install sass
  - gem install jekyll -v 3.2.1
script:
- sbt scalafmtCheck test:scalafmtCheck scalafmtSbtCheck
- "sbt clean coverage startDynamodbLocal test dynamodbLocalTestCleanup makeMicrosite stopDynamodbLocal"
#after_success: "sbt coverageReport coveralls"

language: scala
scala:
- 2.12.8
jdk:
- openjdk8
sudo: false
install:
  - rvm use 2.2.5 --install --fuzzy
  - gem update --system
  - gem install sass
  - gem install jekyll -v 3.2.1
cache:
  directories:
  - $HOME/.sbt
  - $HOME/.ivy2
before_cache:
  - find $HOME/.sbt -name "*.lock" -type f -delete -print
  - find $HOME/.ivy2/cache -name "ivydata-*.properties" -type f -delete -print
before_install:
  - git fetch --tags
  - export PATH=${PATH}:./vendor/bundle
stages:
  - name: test
  - name: microsite
  - name: release
    if: (branch = master AND type = push) OR (tag IS present)

jobs:
  include:
    - &lint
      stage: test
      name: "Lint"
      script: sbt ++$TRAVIS_SCALA_VERSION scalafmtCheck test:scalafmtCheck scalafmtSbtCheck
    - &test
      stage: test
      name: "Test for 2.12"
      script: sbt ++$TRAVIS_SCALA_VERSION coverage startDynamodbLocal test dynamodbLocalTestCleanup stopDynamodbLocal
      after_success: bash <(curl -s https://codecov.io/bash)
    - &microsite
      stage: microsite
      name: "Generate microsite"
      script: sbt ++$TRAVIS_SCALA_VERSION startDynamodbLocal makeMicrosite stopDynamodbLocal
    - &release
      stage: release
      name: "Release artifacts"
      script: sbt ci-release

    # Cross-build
    - <<: *test
      scala: 2.11.12
      name: "Test for 2.11"

Set up new Travis pipeline
Set up new Travis pipeline
