mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-26 02:09:47 +08:00
6fde3632ef
The vendor/ folder was created with the help of @FiloSottile's gvt and vendorcheck. Any dependencies of Caddy plugins outside this repo are not vendored. We do not remove any unused, vendored packages because vendorcheck -u only checks using the current build configuration; i.e. packages that may be imported by files toggled by build tags of other systems. CI tests have been updated to ignore the vendor/ folder. When Go 1.9 is released, a few of the go commands should be revised to again use ./... as it will ignore the vendor folder by default.
40 lines
1.4 KiB
YAML
40 lines
1.4 KiB
YAML
version: "{build}"
|
|
|
|
os: Windows Server 2012 R2
|
|
|
|
clone_folder: c:\gopath\src\github.com\mholt\caddy
|
|
|
|
environment:
|
|
GOPATH: c:\gopath
|
|
|
|
install:
|
|
- rmdir c:\go /s /q
|
|
- 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%
|
|
- go version
|
|
- go env
|
|
- go get -t ./...
|
|
- go get github.com/golang/lint/golint
|
|
- 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
|
|
- go get github.com/gordonklaus/ineffassign
|
|
- go get golang.org/x/tools/cmd/goimports
|
|
- go get github.com/tsenart/deadcode
|
|
|
|
build: off
|
|
|
|
test_script:
|
|
- 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)
|
|
|
|
after_test:
|
|
# 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)
|
|
|
|
deploy: off
|