mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-25 17:56:34 +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
language: go
|
|
|
|
go:
|
|
- 1.8.3
|
|
- tip
|
|
|
|
matrix:
|
|
allow_failures:
|
|
- go: tip
|
|
fast_finish: true
|
|
|
|
before_install:
|
|
# Decrypts a script that installs an authenticated cookie
|
|
# for git to use when cloning from googlesource.com.
|
|
# Bypasses "bandwidth limit exceeded" errors.
|
|
# See github.com/golang/go/issues/12933
|
|
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then openssl aes-256-cbc -K $encrypted_3df18f9af81d_key -iv $encrypted_3df18f9af81d_iv -in dist/gitcookie.sh.enc -out dist/gitcookie.sh -d; fi
|
|
|
|
install:
|
|
- if [ "$TRAVIS_PULL_REQUEST" = "false" ]; then bash dist/gitcookie.sh; fi
|
|
- 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
|
|
|
|
script:
|
|
- gometalinter --disable-all -E vet -E gofmt -E misspell -E ineffassign -E goimports -E deadcode --tests --vendor ./...
|
|
- vendorcheck ./...
|
|
# TODO: When Go 1.9 is released, replace $(go list) subcommand with ./... because vendor folder should be ignored
|
|
- go test -race $(go list ./... | grep -v vendor)
|
|
|
|
after_script:
|
|
# TODO: When Go 1.9 is released, replace $(go list) subcommand with ./... because vendor folder should be ignored
|
|
- golint $(go list ./... | grep -v vendor)
|