From 6f0638421ed1f1eb4789e0df63f97b2a10a51ab1 Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Mon, 1 Jul 2019 13:21:02 -0700 Subject: [PATCH 1/2] Update config.yml --- .circleci/config.yml | 40 ++++++++++++++++++++++++++-------------- 1 file changed, 26 insertions(+), 14 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index d7d96d14..62efe7a8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -8,23 +8,35 @@ jobs: - image: circleci/golang:latest working_directory: /go/src/github.com/gorilla/mux steps: &steps + # Our build steps: we checkout the repo, fetch our deps, lint, and finally + # run "go test" on the package. - checkout + # Logs the version in our build logs, for posterity - 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 - - run: > - if [[ "$LATEST" = true ]]; then - go get -u golang.org/x/lint/golint - golint ./... - fi - - run: > - if [[ "$LATEST" = true ]]; then - diff -u <(echo -n) <(gofmt -d .) - fi - - run: > - if [[ "$LATEST" = true ]]; then - go vet -v . - fi + - run: + name: "Run golint" + command: > + if [[ "${LATEST}" = true ] && [ -z "${SKIP_GOLINT}" ]]; then + go get -u golang.org/x/lint/golint + golint ./... + fi + - run: + name: "Run gofmt" + command: > + if [[ "${LATEST}" = true ]]; then + diff -u <(echo -n) <(gofmt -d -e .) + fi + - run: + name: "Run go vet" + command: > + if [[ "${LATEST}" = true ]]; then + go vet -v ./... + fi - run: go test -v -race ./... "latest": From 7b73d61b6f8c83f7eedb38d5c4f5008b84eab677 Mon Sep 17 00:00:00 2001 From: Matt Silverlock Date: Mon, 1 Jul 2019 13:25:25 -0700 Subject: [PATCH 2/2] Update config.yml --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 62efe7a8..536bc119 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -21,7 +21,7 @@ jobs: - run: name: "Run golint" command: > - if [[ "${LATEST}" = true ] && [ -z "${SKIP_GOLINT}" ]]; then + if [ "${LATEST}" = true ] && [ -z "${SKIP_GOLINT}" ]; then go get -u golang.org/x/lint/golint golint ./... fi