forked from avast/scala-server-toolkit
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
39 lines (34 loc) · 827 Bytes
/
.travis.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
sudo: false
language: scala
jdk: openjdk8
scala:
- 2.12.10
before_install:
- git fetch --tags
stages:
- name: test
- name: release
if: ((branch = master AND type = push) OR (tag IS present)) AND NOT fork
jobs:
include:
-
name: test
script: sbt test
-
name: formatting
script: sbt check
# run ci-release only if previous stages passed
- stage: release
script: sbt ci-release
# These directories are cached to S3 at the end of the build
cache:
directories:
- $HOME/.cache/coursier
- $HOME/.ivy2/cache
- $HOME/.sbt/boot/
- $HOME/.sbt/launchers
before_cache:
# Tricks to avoid unnecessary cache updates
- find $HOME/.sbt -name "*.lock" | xargs rm
- find $HOME/.ivy2 -name "ivydata-*.properties" | xargs rm
- rm -f $HOME/.ivy2/.sbt.ivy.lock