version: 2.1 orbs: codecov: codecov/codecov@1.0.5 jobs: build: docker: - image: golang:1.13 working_directory: /work steps: - checkout - run: name: Install golangci-lint environment: GOLANGCI_LINT_VERSION: 1.21.0 command: | wget -q https://github.com/golangci/golangci-lint/releases/download/v$GOLANGCI_LINT_VERSION/golangci-lint-$GOLANGCI_LINT_VERSION-linux-amd64.tar.gz \ -O /tmp/golangci-lint.tar.gz tar --strip-components=1 -C $GOPATH/bin -xzf /tmp/golangci-lint.tar.gz golangci-lint --version - run: name: Code analysis command: golangci-lint run -v --config .golangci.yml ./... - run: name: Test command: go test -mod=readonly -v -race -count=1 -cover -coverprofile=profile.cov ./... - codecov/upload: file: /work/profile.cov