forked from akka/alpakka-kafka
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
97 lines (78 loc) · 3.28 KB
/
.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
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
language: scala
sudo: false
services:
- docker
before_install:
# upgrade to a later docker-compose which supports services.kafka.scale
- sudo rm /usr/local/bin/docker-compose
- curl -L https://github.com/docker/compose/releases/download/1.22.0/docker-compose-`uname -s`-`uname -m` > docker-compose
- chmod +x docker-compose
- sudo mv docker-compose /usr/local/bin
# fetch full history for correct current and previous version detection
- git fetch --unshallow
# using jabba for custom jdk management
- curl -sL https://raw.githubusercontent.com/shyiko/jabba/0.11.0/install.sh | bash && . ~/.jabba/jabba.sh
- jabba install [email protected]
- jabba install [email protected]
script:
- jabba use ${JDK:[email protected]}
- java -version
- sbt -jvm-opts .jvmopts-travis "$CMD"
jobs:
include:
- stage: check
script: sbt scalafmtCheck || { echo "[error] Unformatted code found. Please run 'Test/compile' and commit the reformatted code."; false; }
env: SCALAFMT_CHECK
- script: sbt scalafmtSbtCheck || { echo "[error] Unformatted sbt code found. Please run 'scalafmtSbt' and commit the reformatted code."; false; }
env: SCALAFMT_SBT_CHECK
- env: CMD="Test/compile"
- env: CMD="Compile/doc"
- env: CMD="docs/paradox"
- stage: test
env: CMD="+test"
- env:
- JDK="[email protected]"
- CMD="+test"
- env: CMD="mimaReportBinaryIssues"
- stage: integration
env: CMD="dockerComposeTestAll"
- env: CMD="benchmarks/dockerComposeTest it:test"
- stage: whitesource
env: CMD=";whitesourceCheckPolicies ;whitesourceUpdate"
- stage: publish
env: CMD="+publish"
stages:
# runs on master commits and PRs
- name: check
if: NOT tag =~ ^v
# runs on master commits and PRs
- name: test
if: NOT tag =~ ^v
# runs on master commits and PRs
- name: integration
if: NOT tag =~ ^v
# runs on main repo master commits and version-tagged commits
- name: whitesource
if: repo = akka/alpakka-kafka AND ( ( branch = master AND type = push ) OR tag =~ ^v )
# runs on main repo master commits and version-tagged commits
- name: publish
if: repo = akka/alpakka-kafka AND ( ( branch = master AND type = push ) OR tag =~ ^v )
after_failure:
- docker-compose logs
- find . -name "*.log" -exec ./scripts/cat-log.sh {} \;
before_cache:
- find $HOME/.ivy2/ -name "ivydata-*.properties" -print -delete
- find $HOME/.sbt -name "*.lock" -print -delete
cache:
directories:
- $HOME/.ivy2/cache
- $HOME/.sbt/boot
- $HOME/.jabba/jdk
env:
global:
# encrypt with: travis encrypt WHITESOURCE_PASSWORD=...
- secure: "ed6tomZjtrq85XLGvpoA1KUcZ55OoWiPdwN0ujqRTTGilOG2p9jAZCARYNSXWdSAtga0gKoW1nCy7SMzl3lcdP5Hlj7MK96R5h7QTHeTh5k8R/aG5fFilWnrvY2rsh0EvuINUkjvyl/jRxDDQpN8mm0NZwHRdsK0sMly4G6XNdY="
# encrypt with: travis encrypt BINTRAY_USER=...
- secure: "EQU8T1lwWKm4770Ivz2QLn830iCC+GrjthZsbatx+0kmnNMotc3Mllxjt4Iph+qnq5ffQK8DRQoTVLHBGavNDkooOBC3irrMwuvtRto5NlcscHfF1OBU1AVlVhregONmThDWQHyA/0l5w68A9Eqe6XrCLdRnwtWM+maud9FqHSU="
# encrypt with: travis encrypt BINTRAY_PASS=...
- secure: "cQY+jITDEZ9rdhHA8ZXYuf3Phrf6UkJqjYdsmtvSe4KNX7W2debD+xIkLZEUC0mC0VC/b2FiN2J+ONY+pS/+j8k8J6SrkSiLUJP1E/7NU7MhoR2tFWNuepO3AcJd/5pDg5n7NQ7H4rwOCSEPIFw4ZN85Lps2NqVCmLQ7piQ1G7g="