-
Notifications
You must be signed in to change notification settings - Fork 6
/
.travis.yml
60 lines (51 loc) · 1.54 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
language: go
matrix:
include:
- go: 1.9
env:
- PYTHON_VERSION=2.7
- go: 1.9
env:
- CHECK_GOLINT=false # tentatively off, golint not support go1.9
- PYTHON_VERSION=3.4 # Ubuntu14's python3 = 3.4.x
- GOCOVERAGE=true
sudo: required
dist: trusty
notifications:
email: false
go_import_path: gopkg.in/sensorbee/py.v0
before_install:
- env
- lsb_release -a
- sudo apt-get -qq update
- if [ "$PYTHON_VERSION" != "2.7" ]; then
sudo apt-get -qq install python3-pip;
sudo pip3 install six;
python3 --version;
else
pip install six;
python --version;
fi
- sudo apt-get -qq install pkg-config
- go version
install:
- if [ $CHECK_GOLINT ]; then go get golang.org/x/lint/golint; fi
- go get -a github.com/mattn/goveralls
- go get -a golang.org/x/tools/cmd/cover
- go get -a github.com/pierrre/gotestcover
- go get -t -d -v ./...
before_script:
- if [ $CHECK_GOLINT ]; then golint ./... | tee .golint.txt && test ! -s .golint.txt; fi
script:
- if [ "$PYTHON_VERSION" != "2.7" ]; then
go build -v --tags=py"$PYTHON_VERSION" ./...;
else
go build -v ./...;
fi
- if [ "$PYTHON_VERSION" != "2.7" ]; then
gotestcover -v -covermode=count -coverprofile=.profile.cov -parallelpackages=1 --tags=py"$PYTHON_VERSION" ./...;
else
gotestcover -v -covermode=count -coverprofile=.profile.cov -parallelpackages=1 ./...;
fi
after_success:
- if [ $GOCOVERAGE ]; then goveralls -coverprofile=.profile.cov -repotoken=$COVERALLS_TOKEN; fi