forked from cloudflare/cloudflare-go
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
52 lines (45 loc) · 1.26 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
language: go
sudo: false
cache:
directories:
- $GOPATH/pkg/mod
env:
global:
- MOD_VENDOR="-mod=vendor"
- GO111MODULE=on
- GOPROXY=https://proxy.golang.org
matrix:
fast_finish: true
include:
- go: 1.12.x
- go: 1.13.x
- go: 1.x
env: LATEST=true
- go: tip
allow_failures:
- go: tip
before_install:
- cd $(mktemp -d); go mod init tmp; go get -u github.com/mitchellh/gox; cd -
- cd $(mktemp -d); go mod init tmp; go get -u golang.org/x/lint/golint; cd -
install:
- # skip
script:
- if [ "$GO111MODULE" != "on" ]; then go get -t -v ./... ; else true; fi
- golint -set_exit_status . cmd/flarectl
- go vet $MOD_VENDOR $(go list $MOD_VENDOR ./... | grep -v /vendor/)
- go test -v -race $MOD_VENDOR ./...
# Only build binaries from the latest Go release.
- if [ "${LATEST}" = "true" ]; then gox -os="linux darwin windows" -arch="amd64" -output="flarectl.{{.OS}}.{{.Arch}}" -ldflags "-X main.Rev=`git rev-parse --short HEAD`" -verbose ./...; fi
# deploy:
# provider: releases
# skip_cleanup: true
# api_key:
# secure: TODO
# file:
# - flarectl.windows.amd64.exe
# - flarectl.darwin.amd64
# - flarectl.linux.amd64
# on:
# repo: cloudflare/cloudflare-go
# tags: true
# condition: $LATEST = true