@@ -8,23 +8,35 @@ jobs:
|
|||||||
- image: circleci/golang:latest
|
- image: circleci/golang:latest
|
||||||
working_directory: /go/src/github.com/gorilla/mux
|
working_directory: /go/src/github.com/gorilla/mux
|
||||||
steps: &steps
|
steps: &steps
|
||||||
|
# Our build steps: we checkout the repo, fetch our deps, lint, and finally
|
||||||
|
# run "go test" on the package.
|
||||||
- checkout
|
- checkout
|
||||||
|
# Logs the version in our build logs, for posterity
|
||||||
- run: go version
|
- run: go version
|
||||||
- run: go get -t -v ./...
|
- run:
|
||||||
|
name: "Fetch dependencies"
|
||||||
|
command: >
|
||||||
|
go get -t -v ./...
|
||||||
# Only run gofmt, vet & lint against the latest Go version
|
# Only run gofmt, vet & lint against the latest Go version
|
||||||
- run: >
|
- run:
|
||||||
if [[ "$LATEST" = true ]]; then
|
name: "Run golint"
|
||||||
go get -u golang.org/x/lint/golint
|
command: >
|
||||||
golint ./...
|
if [ "${LATEST}" = true ] && [ -z "${SKIP_GOLINT}" ]; then
|
||||||
fi
|
go get -u golang.org/x/lint/golint
|
||||||
- run: >
|
golint ./...
|
||||||
if [[ "$LATEST" = true ]]; then
|
fi
|
||||||
diff -u <(echo -n) <(gofmt -d .)
|
- run:
|
||||||
fi
|
name: "Run gofmt"
|
||||||
- run: >
|
command: >
|
||||||
if [[ "$LATEST" = true ]]; then
|
if [[ "${LATEST}" = true ]]; then
|
||||||
go vet -v .
|
diff -u <(echo -n) <(gofmt -d -e .)
|
||||||
fi
|
fi
|
||||||
|
- run:
|
||||||
|
name: "Run go vet"
|
||||||
|
command: >
|
||||||
|
if [[ "${LATEST}" = true ]]; then
|
||||||
|
go vet -v ./...
|
||||||
|
fi
|
||||||
- run: go test -v -race ./...
|
- run: go test -v -race ./...
|
||||||
|
|
||||||
"latest":
|
"latest":
|
||||||
|
|||||||
Reference in New Issue
Block a user