Skip to content

Commit 2cfd90b

Browse files
authored
Setup ci with Travis (#9)
1 parent 8e78c43 commit 2cfd90b

File tree

2 files changed

+28
-0
lines changed

2 files changed

+28
-0
lines changed

.ci_scripts/validate.sh

Lines changed: 18 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,18 @@
1+
#! /bin/bash
2+
3+
set -e
4+
5+
echo "[INFO] Check the source format"
6+
7+
sbt ++$TRAVIS_SCALA_VERSION scalafmt test:scalafmt > /dev/null
8+
git diff --exit-code || (cat >> /dev/stdout <<EOF
9+
[ERROR] Scalafmt check failed, see differences above.
10+
To fix, format your sources using sbt scalafmt test:scalafmt before submitting a pull request.
11+
Additionally, please squash your commits (eg, use git commit --amend) if you're going to update this pull request.
12+
EOF
13+
false
14+
)
15+
16+
echo "[INFO] Running tests" >> /dev/stdout
17+
18+
sbt ++$TRAVIS_SCALA_VERSION testOnly

.travis.yml

Lines changed: 10 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,10 @@
1+
sudo: false
2+
language: scala
3+
jdk:
4+
- oraclejdk8
5+
scala: 2.12.4
6+
cache:
7+
directories:
8+
- $HOME/.ivy2
9+
- $HOME/.sbt
10+
script: ./.ci_scripts/validate.sh

0 commit comments

Comments
 (0)