Skip to content

Commit

Permalink
added a styling stage to check the styles first (#2752)
Browse files Browse the repository at this point in the history
before committing to run the full build.
  • Loading branch information
kailuowang authored Mar 27, 2019
1 parent e1de69b commit 56a1339
Showing 1 changed file with 5 additions and 9 deletions.
14 changes: 5 additions & 9 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,6 +20,7 @@ before_install:
- export PATH=${PATH}:./vendor/bundle

stages:
- name: styling
- name: test
- name: publish snapshot
if: (branch = master AND type = push)
Expand Down Expand Up @@ -55,7 +56,8 @@ jobs:
install: gem install jekyll -v 2.5
script: sbt makeMicrosite

- env: TEST="linting"
- stage: styling
env: TEST="linting"
script: sbt scalastyle fmtCheck

- env: TEST="scalafix"
Expand All @@ -68,19 +70,13 @@ jobs:
- <<: *bincompat_check
scala: *scala_version_212

- &publish_snapshot
stage: publish snapshot
- stage: publish snapshot
script: |
if [[ $(cat version.sbt) =~ "-SNAPSHOT" ]]; then
sbt ++$TRAVIS_SCALA_VERSION! publish gitSnapshots publish
sbt +publish gitSnapshots +publish
else
echo Not publishing a snapshot because the version does not end with -SNAPSHOT for version $TRAVIS_SCALA_VERSION
fi
scala: *scala_version_211
- <<: *publish_snapshot
scala: *scala_version_212
- <<: *publish_snapshot
scala: *scala_version_213
notifications:
webhooks:
Expand Down

0 comments on commit 56a1339

Please sign in to comment.