version: 2.1 orbs: codecov: codecov/codecov@1.0.5 defaults: &defaults working_directory: /src docker: - image: golang:1.13 jobs: lint_markdown: <<: *defaults docker: - image: node:11-slim steps: - checkout - run: name: Install markdownlint command: npm install -g markdownlint-cli - run: name: Check for Lint command: markdownlint . build_source: <<: *defaults steps: - checkout - run: name: Build Source command: go build -mod=readonly ./... lint_source: <<: *defaults steps: - checkout - run: name: Install golangci-lint command: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s -- -b $(go env GOPATH)/bin v1.18.0 - run: name: Check for Lint command: golangci-lint run unit_test: <<: *defaults steps: - checkout - run: name: Run Tests command: go test -coverprofile cover.out -race ./... - codecov/upload: file: cover.out workflows: version: 2 build_and_test: jobs: - lint_markdown - build_source - lint_source - unit_test