From dc394c6b9c5e8d88fba9645ec1530d5e5e4e3549 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?=C3=93lafur=20P=C3=A1ll=20Geirsson?= Date: Mon, 10 Sep 2018 15:52:47 +0200 Subject: [PATCH] Update .travis.yml to use build stages --- .travis.yml | 31 ++++++++++++++++++------------- 1 file changed, 18 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 1142231c..d41e56db 100644 --- a/.travis.yml +++ b/.travis.yml @@ -1,27 +1,32 @@ language: scala -scala: 2.12.4 +scala: 2.12.6 jdk: oraclejdk8 sudo: false dist: trusty +stages: + - name: test + - name: release + if: (branch = master AND type = push) OR (tag IS present) + + env: global: - TRAVIS_NODE_VERSION="8" - TRAVIS_YARN_VERSION="1.3.2" -matrix: +jobs: include: - - script: sbt ci-test - env: CI_PUBLISH=true - deploy: - provider: script - script: bash bin/ci-publish.sh - - script: sbt ";^^$SCRIPTED_SBT_VERSION; scripted" - env: SCRIPTED_SBT_VERSION="0.13.17" - - script: sbt ";^^$SCRIPTED_SBT_VERSION; scripted" - env: SCRIPTED_SBT_VERSION="1.0.4" - - script: ./bin/scalafmt --test - env: SCALAFMT=true + - env: TEST="sbt test" + script: sbt ci-test + - env: SCRIPTED_SBT_VERSION="0.13.17" + script: sbt ";^^$SCRIPTED_SBT_VERSION; scripted" + - env: SCRIPTED_SBT_VERSION="1.2.1" + script: sbt ";^^$SCRIPTED_SBT_VERSION; scripted" + - env: TEST=scalafmt + script: ./bin/scalafmt --test + - stage: release + script: sbt ci-release cache: yarn: true