diff --git a/.circleci/config.yml b/.circleci/config.yml index a40cec1..639916f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -6,6 +6,23 @@ jobs: steps: - checkout - run: go build ./... + format: + docker: + - image: golang:latest + steps: + - checkout + - run: + name: Install gofumports outside local module + command: | + cd $(mktemp -d) && + go mod init tmp && + go get mvdan.cc/gofumpt/gofumports@latest + - run: + name: Run gofumports on all non-generated files + command: grep -L -R "^\/\/ Code generated .* DO NOT EDIT\.$" --exclude-dir=.git --exclude-dir=vendor --include="*.go" | xargs -n 1 gofumports -w -local github.com/johanbrandhorst/certify + - run: + name: Check for any changes + command: git diff --exit-code vendor: docker: - image: golang:latest @@ -59,6 +76,7 @@ workflows: all: jobs: - build + - format - vendor - generate - test