Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
18 changes: 18 additions & 0 deletions .ci_scripts/validate.sh
Original file line number Diff line number Diff line change
@@ -0,0 +1,18 @@
#! /bin/bash

set -e

echo "[INFO] Check the source format"

sbt ++$TRAVIS_SCALA_VERSION scalafmt test:scalafmt > /dev/null
git diff --exit-code || (cat >> /dev/stdout <<EOF
[ERROR] Scalafmt check failed, see differences above.
To fix, format your sources using sbt scalafmt test:scalafmt before submitting a pull request.
Additionally, please squash your commits (eg, use git commit --amend) if you're going to update this pull request.
EOF
false
)

echo "[INFO] Running tests" >> /dev/stdout

sbt ++$TRAVIS_SCALA_VERSION testOnly
10 changes: 10 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@
sudo: false
language: scala
jdk:
- oraclejdk8
scala: 2.12.4
cache:
directories:
- $HOME/.ivy2
- $HOME/.sbt
script: ./.ci_scripts/validate.sh