-
Notifications
You must be signed in to change notification settings - Fork 220
/
Copy path.travis.yml
59 lines (52 loc) · 1.51 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
53
54
55
56
57
58
59
language: go
go:
- 1.13.x
- 1.14.x
- 1.15.x
- master
env:
- GO111MODULE=on GOFLAGS=-mod=readonly
- GO111MODULE=off
jobs:
include:
- name: "Module support outside of GOPATH"
go: stable
before_script: >-
mv $GOPATH/src/github.com/getsentry/sentry-go ~/sentry-go &&
cd ~/sentry-go &&
export GOPATH= &&
go env GOPATH
script: >-
go test ./... &&
go test ./... -race
allow_failures:
- go: master
- env: GO111MODULE=off
fast_finish: true
before_install:
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/v1.27.0/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.27.0
# Fetch origin/master. This is required for `git merge-base` when testing a
# branch, since Travis clones only the target branch.
- git fetch origin master:remotes/origin/master
install: |
if [[ $GO111MODULE == off ]]; then
# Iris is not supported in legacy GOPATH mode. We delete the source code
# because otherwise lint, build, and test steps would fail.
rm -vrf ./iris/ ./example/iris/
go get -v -t ./...
fi
# go get is not required in Module mode
script:
- golangci-lint run --new-from-rev=$(git merge-base origin/master HEAD)
- go build ./...
- go test ./...
- go test ./... -race
notifications:
webhooks:
urls:
- https://zeus.ci/hooks/befe9810-9285-11e9-b01a-0a580a281808/public/provider/travis/webhook
on_success: always
on_failure: always
on_start: always
on_cancel: always
on_error: always