96 строки
2,1 КиБ
YAML
96 строки
2,1 КиБ
YAML
version: 2.1
|
|
|
|
orbs:
|
|
codecov: codecov/codecov@1.0.5
|
|
|
|
executors:
|
|
exec_go_1_12:
|
|
docker:
|
|
- image: circleci/golang:1.12.16
|
|
exec_go_1_13:
|
|
docker:
|
|
- image: circleci/golang:1.13.8
|
|
exec_go_1_14:
|
|
docker:
|
|
- image: circleci/golang:1.14.0
|
|
|
|
commands:
|
|
fmt:
|
|
description: "Run gofmt"
|
|
steps:
|
|
- run: gofmt -d -e . 2>&1 | tee outfile && test -z "$(cat outfile)" && rm outfile
|
|
lint:
|
|
description: "Run golint"
|
|
steps:
|
|
- run: go get -u golang.org/x/lint/golint
|
|
- run: golint -set_exit_status ./...
|
|
- run: cd _examples && golint -set_exit_status ./... && cd ..
|
|
install:
|
|
description: "Install dependencies for go1.12"
|
|
steps:
|
|
- run: GO111MODULE=on go mod vendor
|
|
vet:
|
|
description: "Run go vet"
|
|
steps:
|
|
- run: go vet github.com/cucumber/godog
|
|
- run: go vet github.com/cucumber/godog/colors
|
|
go_test:
|
|
description: "Run go test"
|
|
steps:
|
|
- run: go test -v -race -coverprofile=coverage.txt -covermode=atomic
|
|
godog:
|
|
description: "Run godog"
|
|
steps:
|
|
- run: go install ./cmd/godog
|
|
- run: godog -f progress --strict
|
|
coverage:
|
|
description: "Report on code coverage"
|
|
steps:
|
|
- codecov/upload:
|
|
file: "coverage.txt"
|
|
part1:
|
|
description: "Part1 include all commands that doesn't need dependencies installed"
|
|
steps:
|
|
- checkout
|
|
- fmt
|
|
- lint
|
|
part2:
|
|
description: "Part2 is the all other commands"
|
|
steps:
|
|
- vet
|
|
- go_test
|
|
- godog
|
|
- coverage
|
|
all:
|
|
description: "Run all commands against godog code"
|
|
steps:
|
|
- part1
|
|
- part2
|
|
|
|
|
|
jobs:
|
|
go1_12:
|
|
working_directory: /go/src/github.com/cucumber/godog
|
|
executor: exec_go_1_12
|
|
steps:
|
|
- part1
|
|
- install
|
|
- part2
|
|
go1_13:
|
|
working_directory: /go/src/github.com/cucumber/godog
|
|
executor: exec_go_1_13
|
|
steps:
|
|
- all
|
|
go1_14:
|
|
working_directory: /go/src/github.com/cucumber/godog
|
|
executor: exec_go_1_14
|
|
steps:
|
|
- all
|
|
|
|
workflows:
|
|
version: 2
|
|
test:
|
|
jobs:
|
|
- go1_12
|
|
- go1_13
|
|
- go1_14
|