-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (43 loc) · 1.44 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
language: go
os:
- linux
go:
- 1.9.x
env:
- WITH_COVERAGE=true
- GOFLAGS='-race'
install:
- go get ${GOFLAGS} -d -t ./...
- go get github.com/client9/misspell/cmd/misspell
- go get github.com/fzipp/gocyclo
- go get github.com/golang/lint/golint
- go get golang.org/x/tools/cmd/stringer
script:
- set -e
- cd "$HOME/gopath/src/github.com/phad/msmtohl"
- |
echo 'Running go build'
go build ./...
echo 'Running go test with coverage'
mkdir -p /tmp/phad_msmtohl_profile
rm -f /tmp/phad_msmtohl_profile/*
echo 'TODO(phad): enumerate packages automatically otherwise new ones will be forgotten.'
go test -covermode=atomic -coverprofile='/tmp/phad_msmtohl_profile/model.out' github.com/phad/msmtohl/model
go test -covermode=atomic -coverprofile='/tmp/phad_msmtohl_profile/converter.out' github.com/phad/msmtohl/converter
go test -covermode=atomic -coverprofile='/tmp/phad_msmtohl_profile/parser_qif.out' github.com/phad/msmtohl/parser/qif
cat /tmp/phad_msmtohl_profile/*.out > /tmp/coverage.txt
echo 'Running golint'
golint --set_exit_status ./...
echo 'Running go vet'
go vet ./...
echo 'Running gocyclo'
gocyclo -over 20 .
echo 'Running misspell'
misspell -error -locale UK .
- set +e
after_success:
- |
if [[ -f /tmp/coverage.txt ]]; then
cp /tmp/coverage.txt .
bash <(curl -s https://codecov.io/bash)
fi