forked from panjf2000/gnet
-
Notifications
You must be signed in to change notification settings - Fork 0
/
.travis.yml
49 lines (40 loc) · 2.12 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
env:
global:
- GO111MODULE=on
- secure: IZaEAuG1caQRBXf68hJDWNEveWc+Zk/Sf887DvMkpfWxCM43JqNPF6w0NEfFIyhtOeiVUPRiayn8Z8CjNr5xA/xvK4n31j8G5adYdOB0bR6pM0RoJ7p/Ji0Jni+8R5+IeDO+hORwA215TXPpjjmKeLgMdCXFZqZ1mlOLjBJlBu6sqZzfJe1k873fWJD+xGj5h9GdQveiWbEBtewUWoQeajtq+XHMzjwZxZwhOGUiQhkO9GIYih+oBQlggTf6VzT6FSN1/OTShC2yC6wtsJmqbD4GgGX2Ig8h9n9s/ZMJOFBpWdZMMIL6KJ4cWgANoH5AiBqjXglns8KB8iu7vh9zP4YckSO/s3ufb/w/VnqhZ8F5lWiD4pNyDdWxPKFLT5eO1aTlGmJYvHezZNVx3D6ASRryoH7pI9cduPbcLuA7+d3+FZ7lO/a30TRBHyW6vcDx7vjbTe1M462WGrHKNA6pzpWo3W5rjefo4Msg/wsh6+aD0XmIZ41lxXf/W/IpZ5RyR7R9q3sszdKxG+bkwIgNu0dUwMuenupsP9D+MBVURSY5Jgi1S6xz6R/MZnpN/wlLbI9t4FOcmkd5qj31XB8PDbcH4S+u27+iys9y7rdHwAbhF5qeGNeBwaAQaaXO/AAplJntXsph/7vPCTyHvQrH/shUBG6I2VkQpOJEmQyc1rE=
dist: bionic
os:
- linux
- osx
- windows
go:
- 1.11.x
- 1.12.x
- 1.13.x
- 1.14.x
go_import_path: github.com/panjf2000/gnet
before_install:
- if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go";
export PATH="$GOPATH/bin:$PATH"; fi
- mkdir -p ~/bin/ && export PATH="~/bin/:$PATH"
install:
- go get -u golang.org/x/lint/golint
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0
- curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh | sh -s -- -b ~/bin
script:
- |-
case $TRAVIS_OS_NAME in
linux|osx)
golint ./... | reviewdog -f=golint -reporter=github-check
golangci-lint run --out-format=line-number -E gofmt -E golint -E misspell -E lll | reviewdog -f=golangci-lint -reporter=github-check
golint ./... | reviewdog -f=golint -reporter=github-pr-review
golangci-lint run --out-format=line-number -E gofmt -E golint -E misspell -E lll | reviewdog -f=golangci-lint -reporter=github-pr-review
;;
esac
- go test -v ./...
- go test -v -coverprofile=coverage.txt -covermode=count -timeout 60s
after_success:
- if [[ "$TRAVIS_OS_NAME" == "windows" ]]; then curl -s https://codecov.io/bash >
.codecov && chmod +x .codecov && ./.codecov; else bash <(curl -s https://codecov.io/bash);
fi