Exclude golangci-lint from Windows

This commit is contained in:
Andy Pan 2020-04-08 18:44:28 +08:00
parent 7135fcafc8
commit f33679bb79
1 changed files with 14 additions and 13 deletions

View File

@ -13,27 +13,28 @@ go:
- 1.13.x - 1.13.x
- 1.14.x - 1.14.x
go_import_path: github.com/panjf2000/ants
before_install: before_install:
- if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go"; - if [[ "${GO111MODULE}" = "on" ]]; then mkdir "${HOME}/go"; export GOPATH="${HOME}/go";
export PATH="$GOPATH/bin:$PATH"; fi export PATH="$GOPATH/bin:$PATH"; fi
- mkdir -p ~/bin/ && export PATH="~/bin/:$PATH"
install: install:
- go get -u golang.org/x/lint/golint - go get -u golang.org/x/lint/golint
- curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh - curl -sSfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh | sh -s -- -b $(go env GOPATH)/bin v1.24.0
| 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
- mkdir -p ~/bin/ && export PATH="~/bin/:$PATH"
- curl -sfL https://raw.githubusercontent.com/reviewdog/reviewdog/master/install.sh|
sh -s -- -b ~/bin
go_import_path: github.com/panjf2000/ants
script: script:
- golint ./... | reviewdog -f=golint -reporter=github-check - |-
- golangci-lint run --out-format=line-number -E golint -E misspell -E lll -E gofmt case $TRAVIS_OS_NAME in
| reviewdog -f=golangci-lint -reporter=github-check linux|osx)
- golint ./... | reviewdog -f=golint -reporter=github-pr-review golint ./... | reviewdog -f=golint -reporter=github-check
- golangci-lint run --out-format=line-number -E golint -E misspell -E lll -E gofmt golangci-lint run --out-format=line-number -E gofmt -E golint -E misspell -E lll | reviewdog -f=golangci-lint -reporter=github-check
| reviewdog -f=golangci-lint -reporter=github-pr-review 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 -race -coverprofile=coverage.txt -covermode=atomic -v - go test -race -coverprofile=coverage.txt -covermode=atomic -v
after_success: after_success: