From f33679bb799fe76b52d47d3172c40ce229463198 Mon Sep 17 00:00:00 2001 From: Andy Pan Date: Wed, 8 Apr 2020 18:44:28 +0800 Subject: [PATCH] Exclude golangci-lint from Windows --- .travis.yml | 27 ++++++++++++++------------- 1 file changed, 14 insertions(+), 13 deletions(-) diff --git a/.travis.yml b/.travis.yml index 21f8065..bb9ed87 100644 --- a/.travis.yml +++ b/.travis.yml @@ -13,27 +13,28 @@ go: - 1.13.x - 1.14.x +go_import_path: github.com/panjf2000/ants + 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 - - 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 + - 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: - - golint ./... | reviewdog -f=golint -reporter=github-check - - golangci-lint run --out-format=line-number -E golint -E misspell -E lll -E gofmt - | reviewdog -f=golangci-lint -reporter=github-check - - golint ./... | reviewdog -f=golint -reporter=github-pr-review - - golangci-lint run --out-format=line-number -E golint -E misspell -E lll -E gofmt - | reviewdog -f=golangci-lint -reporter=github-pr-review + - |- + 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 -race -coverprofile=coverage.txt -covermode=atomic -v after_success: