forked from elastic/gosigar
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
36 lines (28 loc) · 936 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
language: go
os:
- linux
- osx
go:
- 1.8.3
env:
global:
- PROJ="github.com/elastic/gosigar"
sudo: false
before_install:
# Put project into proper GOPATH location (important for forks).
- mkdir -p $HOME/gopath/src/${PROJ}
- rsync -az ${TRAVIS_BUILD_DIR}/ $HOME/gopath/src/${PROJ}/
- export TRAVIS_BUILD_DIR=$HOME/gopath/src/${PROJ}
- cd $HOME/gopath/src/${PROJ}
install:
- go get -v -t -d ./...
- go get github.com/elastic/beats/vendor/github.com/pierrre/gotestcover
script:
- gofmt -l . | read && echo "Code differs from gofmt's style. Run 'gofmt -w .'" 1>&2 && exit 1 || true
- go vet
- go build
- mkdir -p build/coverage
- gotestcover -v -coverprofile=build/coverage/unit.cov github.com/elastic/gosigar/...
- for i in $(ls examples); do go build -o examples/$i/$i ./examples/$i; ./examples/$i/$i; done
after_success:
- bash <(curl -s https://codecov.io/bash) -f build/coverage/unit.cov