forked from Salamek/sensu-go-load-check
-
Notifications
You must be signed in to change notification settings - Fork 1
/
Copy path.travis.yml
35 lines (31 loc) · 988 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
language: go
go:
- 1.12.x
install:
- go get gopkg.in/alecthomas/gometalinter.v1
- go get github.com/gordonklaus/ineffassign
- go get github.com/jgautheron/goconst/cmd/goconst
- go get github.com/kisielk/errcheck
- go get github.com/golang/dep/cmd/dep
- dep ensure
script:
- gometalinter.v1 --vendor --disable-all --enable=vet --enable=ineffassign
--enable=goconst --tests ./...
- go test -v -race ./...
before_script:
- echo "REPO $TRAVIS_REPO_SLUG TAG ${TRAVIS_TAG}"
deploy:
- #goreleaser
provider: script
script: curl -sL https://git.io/goreleaser | bash
skip_cleanup: true
on:
tags: true
condition: $TRAVIS_OS_NAME = linux
after_deploy:
- git clone https://github.com/sensu/sensu-go-bonsai-asset.git bonsai
- bonsai/generate-sha512sum.sh
- bonsai/github-release-upload.sh github_api_token=$GITHUB_TOKEN repo_slug="$TRAVIS_REPO_SLUG" tag="${TRAVIS_TAG}" filename="dist/$(cat dist/sha512_file)"
#env:
# global:
# - secure: GITHUB_TOKEN_SECRET