forked from kafka4beam/brod
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy path.travis.yml
62 lines (53 loc) · 1.43 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
language: erlang
sudo: required
services:
- docker
# install latest rebar3 because the one travis provides doesn't support cover_export_name option
before_install:
- git clone https://github.com/erlang/rebar3.git && cd rebar3 && git checkout 3.13.0 && ./bootstrap && sudo mv rebar3 /usr/local/bin/ && cd ..
- git clone https://github.com/inaka/elvis.git && cd elvis && rebar3 escriptize && sudo cp _build/default/bin/elvis /usr/bin && cd ..
- sudo docker info
notifications:
email: false
otp_release:
- 23.0.3
- 22.0.2
- 21.0
- 19.3
script:
# check style first
- elvis rock
# test with rebar3
- make clean
- rebar3 compile
- make clean
- rebar3 edoc
- rebar3 xref
- make brod-cli
- |
set -e
OTP_VSN=`erl -noshell -eval 'io:format(erlang:system_info(otp_release)), halt(0)'`
if [ $OTP_VSN -eq 23 ]; then
# run dialyzer only in otp 23
rebar3 dialyzer
export KAFKA_VERSION="2.2"
fi
if [ $OTP_VSN -eq 22 ]; then
export KAFKA_VERSION="2.2"
fi
if [ $OTP_VSN -eq 21 ]; then
export KAFKA_VERSION="0.11"
fi
if [ $OTP_VSN -eq 19 ]; then
export KAFKA_VERSION="0.10"
fi
make test-env
_build/brod_cli/rel/brod/bin/brod meta -b localhost -L
make t || make t
make cover
after_success:
- |
OTP_VSN=`erl -noshell -eval 'io:format(erlang:system_info(otp_release)), halt(0)'`
if [ $OTP_VSN -eq 21 ]; then
make coveralls
fi