0
Fork 0
mirror of https://github.com/caddyserver/caddy.git synced 2024-12-23 22:27:38 -05:00
caddy/.travis.yml
Matthew Holt 7271b57136 Add golint and ineffassign to CI scripts
golint is not part of the tests since our Markdown dependency defines
an interface that is not lint-compliant (unfortunately).
See https://github.com/russross/blackfriday/issues/240
2016-03-26 14:26:12 -06:00

31 lines
863 B
YAML

language: go
go:
- 1.6
- tip
env:
- CGO_ENABLED=0
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 golang.org/x/tools/cmd/vet
- go get github.com/golang/lint/golint
- go get github.com/gordonklaus/ineffassign
script:
- "[ -z \"$(find -name \"*.go\" | xargs gofmt -s -l)\" ] || exit 1"
- ineffassign .
- go vet ./...
- go test ./...
after_script:
- golint ./...