godog/.circleci/config.yml
Fredrik Lönnblad 69162a0d82
Removed go1.12 and added go1.15 to CI config (#356)
* Removed go1.12 and added go1.15 to CI config

* Updated release-notes
2020-11-26 11:43:42 +01:00

83 строки
1,9 КиБ
YAML

version: 2.1
orbs:
codecov: codecov/codecov@1.0.5
executors:
exec_go_1_13:
docker:
- image: circleci/golang:1.13.15
exec_go_1_14:
docker:
- image: circleci/golang:1.14.12
exec_go_1_15:
docker:
- image: circleci/golang:1.15.5
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 ..
vet:
description: "Run go vet"
steps:
- run: go vet ./...
- run: cd _examples && go vet ./... && cd ..
go_test:
description: "Run go test"
steps:
- run: sed -i 's#github.com/cucumber/godog/internal/formatters_test#/internal/formatters_test#g' internal/formatters/formatter-tests/*/*
- run: go test -v -race -coverprofile=coverage.txt -covermode=atomic ./...
- run: cd _examples && go test -v -race ./... && cd ..
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"
all:
description: "Run all commands against godog code"
steps:
- checkout
- fmt
- lint
- vet
- go_test
- godog
- coverage
jobs:
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
go1_15:
working_directory: /go/src/github.com/cucumber/godog
executor: exec_go_1_15
steps:
- all
workflows:
version: 2
test:
jobs:
- go1_13
- go1_14
- go1_15