-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy path.travis.yml
30 lines (30 loc) · 1.04 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
sudo: false
language: go
go:
- 1.8
env:
- PATH=/home/travis/gopath/bin:$PATH
before_install:
- env
- npm --version
- go version
- git fetch --unshallow
- git describe --tags --dirty --long
- go get github.com/mitchellh/gox
- go get github.com/tcnksm/ghr
- go get github.com/axw/gocov/gocov
- go get github.com/mattn/goveralls
- go get golang.org/x/tools/cmd/cover
- nvm install 4.2
script:
- make && go test ./... && ./runcover.sh ./...
- '[ "${TRAVIS_PULL_REQUEST}" = "false" ] && goveralls -coverprofile=profile.cov -service travis-ci -repotoken $COVERALLS_TOKEN'
after_success:
- gox -ldflags="-s -w -X main.version=${TRAVIS_TAG:-$TRAVIS_COMMIT}" -output "dist/{{.OS}}_{{.Arch}}_{{.Dir}}"
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then ghr --username boivie --token $GITHUB_TOKEN --replace --prerelease --debug -c $TRAVIS_COMMIT latest dist/; fi
- if [ "$TRAVIS_TAG" != "" ]; then ghr --username boivie --token $GITHUB_TOKEN --replace -c $TRAVIS_COMMIT $TRAVIS_TAG dist/; fi
notifications:
email:
recipients:
- victor@boivie.com
on_success: always