2015-10-13 09:11:02 +08:00
|
|
|
version: "{build}"
|
|
|
|
|
|
|
|
os: Windows Server 2012 R2
|
|
|
|
|
2015-10-13 09:17:50 +08:00
|
|
|
clone_folder: c:\gopath\src\github.com\mholt\caddy
|
2015-10-13 09:11:02 +08:00
|
|
|
|
|
|
|
environment:
|
2015-10-13 09:17:50 +08:00
|
|
|
GOPATH: c:\gopath
|
2015-10-13 09:11:02 +08:00
|
|
|
|
|
|
|
install:
|
2016-02-20 09:07:48 +08:00
|
|
|
- rmdir c:\go /s /q
|
2017-05-28 03:30:11 +08:00
|
|
|
- appveyor DownloadFile https://storage.googleapis.com/golang/go1.8.3.windows-amd64.zip
|
|
|
|
- 7z x go1.8.3.windows-amd64.zip -y -oC:\ > NUL
|
|
|
|
- set PATH=%GOPATH%\bin;%PATH%
|
2015-10-13 09:11:02 +08:00
|
|
|
- go version
|
|
|
|
- go env
|
2016-02-18 07:08:25 +08:00
|
|
|
- go get -t ./...
|
2016-03-27 04:26:12 +08:00
|
|
|
- go get github.com/golang/lint/golint
|
2017-05-28 03:30:11 +08:00
|
|
|
- go get github.com/FiloSottile/vendorcheck
|
|
|
|
# Install gometalinter and certain linters
|
|
|
|
- go get github.com/alecthomas/gometalinter
|
|
|
|
- go get github.com/client9/misspell/cmd/misspell
|
2016-03-27 04:26:12 +08:00
|
|
|
- go get github.com/gordonklaus/ineffassign
|
2017-05-28 03:30:11 +08:00
|
|
|
- go get golang.org/x/tools/cmd/goimports
|
|
|
|
- go get github.com/tsenart/deadcode
|
2015-10-13 09:11:02 +08:00
|
|
|
|
2016-02-20 09:07:48 +08:00
|
|
|
build: off
|
|
|
|
|
|
|
|
test_script:
|
2017-05-28 03:30:11 +08:00
|
|
|
- gometalinter --disable-all -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode --tests --vendor ./...
|
|
|
|
- vendorcheck ./...
|
|
|
|
# TODO: When Go 1.9 comes out, replace this whole line with `go test -race ./...` b/c vendor folder should be ignored
|
|
|
|
- for /f "" %%G in ('go list ./... ^| find /i /v "/vendor/"') do (go test -race %%G & IF ERRORLEVEL == 1 EXIT 1)
|
2016-03-27 04:26:12 +08:00
|
|
|
|
|
|
|
after_test:
|
2017-05-28 03:30:11 +08:00
|
|
|
# TODO: When Go 1.9 comes out, replace this whole line with `golint ./...` b/c vendor folder should be ignored
|
|
|
|
- for /f "" %%G in ('go list ./... ^| find /i /v "/vendor/"') do (golint %%G & IF ERRORLEVEL == 1 EXIT 1)
|
2016-02-20 09:07:48 +08:00
|
|
|
|
|
|
|
deploy: off
|