pipeline:
  # Fetch folders from distributed cache
  sftp_cache_restore:
    image: plugins/sftp-cache
    restore: true
    mount:
      - /drone/.ivy2
      - /drone/.coursier-cache
      - /drone/.sbt
      - /drone/.git

  tests:
    image: scalaplatform/scala:0.5
    pull: true
    commands:
      - git fetch --tags && git log | head -n 20
      - ./bin/checkCLA.sh
      - ./bin/scalafmt --test
      - sbt $TEST

  publish:
    image: scalaplatform/scala:0.5
    environment:
      - SONATYPE_USERNAME=$$SONATYPE_USERNAME
      - SONATYPE_PASSWORD=$$SONATYPE_PASSWORD
      - GITHUB_USERNAME=$$GITHUB_USERNAME
      - GITHUB_PASSWORD=$$GITHUB_PASSWORD
      - BINTRAY_USERNAME=$$BINTRAY_USERNAME
      - BINTRAY_API_KEY=$$BINTRAY_API_KEY
      - MAILGUN_PASSWORD=$$MAILGUN_PASSWORD
    commands:
      - ./bin/bintray.sh
    when:
      event: push
      branch: [master, 2.x]

  # Save folders in distributed cache
  sftp_cache_rebuild:
    image: plugins/sftp-cache
    rebuild: true
    mount:
      - /drone/.ivy2
      - /drone/.coursier-cache
      - /drone/.sbt
      - /drone/.git

matrix:
  TEST:
    - ci-fast
    - ci-slow


pipeline:
  # Fetch folders from distributed cache
  sftp_cache_restore:
    image: plugins/sftp-cache
    restore: true
    mount:
      - /drone/.ivy2
      - /drone/.coursier-cache
      - /drone/.sbt
      - /drone/.git

  tests:
    image: scalaplatform/scala:0.6
    pull: true
    commands:
      - git fetch --tags && git log | head -n 20
      - ./bin/checkCLA.sh
      - ./bin/scalafmt --test
      - sbt $TEST

  publish:
    image: scalaplatform/scala:0.6
    environment:
      - SONATYPE_USERNAME=$$SONATYPE_USERNAME
      - SONATYPE_PASSWORD=$$SONATYPE_PASSWORD
      - GITHUB_USERNAME=$$GITHUB_USERNAME
      - GITHUB_PASSWORD=$$GITHUB_PASSWORD
      - BINTRAY_USERNAME=$$BINTRAY_USERNAME
      - BINTRAY_API_KEY=$$BINTRAY_API_KEY
      - MAILGUN_PASSWORD=$$MAILGUN_PASSWORD
    commands:
      - ./bin/bintray.sh
    when:
      event: push
      branch: [master, 2.x]

  # Save folders in distributed cache
  sftp_cache_rebuild:
    image: plugins/sftp-cache
    rebuild: true
    mount:
      - /drone/.ivy2
      - /drone/.coursier-cache
      - /drone/.sbt
      - /drone/.git

matrix:
  TEST:
    - ci-fast
    - ci-slow


Use latest version of scala platform docker image
Use latest version of scala platform docker image
