From b0770f01cc86b38a7494282bbe5d99f42d0aba08 Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 19:28:14 -0700 Subject: [PATCH 01/16] Use commands and add env vars --- .circleci/config.yml | 43 +++++++++++++++++++++++++++++++++++++------ 1 file changed, 37 insertions(+), 6 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f4af1c1..bc4229f 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -11,27 +11,58 @@ executors: docker: - image: circleci/golang:1.13 +commands: + env: + steps: + - run: export GOROOT=/usr/local/go + - run: export GOPATH=$HOME/go + - run: export GO111MODULE=on + - run: export PATH=$GOPATH/bin:$GOROOT/bin:$PATH + vet: + steps: + - run: go vet github.com/cucumber/godog + - run: go vet github.com/cucumber/godog/gherkin + - run: go vet github.com/cucumber/godog/colors + + fmt: + steps: + - run: test -z "$(go fmt ./...)" + + godog: + steps: + - run: godog -f progress + + go_test: + steps: + - run: go test -v -race -coverprofile=coverage.txt -covermode=atomic + + all: + steps: + - env + - vet + - fmt + - godog + - go_test + jobs: go1_11: working_directory: /go/src/github.com/cucumber/godog executor: go1_11 steps: - - checkout - - run: make test + - all go1_12: working_directory: /go/src/github.com/cucumber/godog executor: go1_12 steps: - - checkout - - run: make test + - all go1_13: working_directory: /go/src/github.com/cucumber/godog executor: go1_13 steps: - - checkout - - run: make test + - all + workflows: version: 2 From 184e8d01ee6530515f11f5710bad75f9a770cc17 Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 19:29:56 -0700 Subject: [PATCH 02/16] Change env setup --- .circleci/config.yml | 9 +++++---- 1 file changed, 5 insertions(+), 4 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index bc4229f..2f811e8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -14,10 +14,11 @@ executors: commands: env: steps: - - run: export GOROOT=/usr/local/go - - run: export GOPATH=$HOME/go - - run: export GO111MODULE=on - - run: export PATH=$GOPATH/bin:$GOROOT/bin:$PATH + - run: | + export GOROOT=/usr/local/go + export GOPATH=$HOME/go + export GO111MODULE=on + export PATH=$GOPATH/bin:$GOROOT/bin:$PATH vet: steps: - run: go vet github.com/cucumber/godog From c82857d7da342eea0ca3f02464443c7a6a7d2b16 Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 19:32:29 -0700 Subject: [PATCH 03/16] Update env command and add descriptions to others --- .circleci/config.yml | 17 ++++++++++++----- 1 file changed, 12 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2f811e8..6184651 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -13,31 +13,38 @@ executors: commands: env: + description: "Setup environment variables" steps: - - run: | - export GOROOT=/usr/local/go - export GOPATH=$HOME/go - export GO111MODULE=on - export PATH=$GOPATH/bin:$GOROOT/bin:$PATH + - run: + command: | + export GOROOT=/usr/local/go + export GOPATH=$HOME/go + export GO111MODULE=on + export PATH=$GOPATH/bin:$GOROOT/bin:$PATH vet: + description: "Run go vet" steps: - run: go vet github.com/cucumber/godog - run: go vet github.com/cucumber/godog/gherkin - run: go vet github.com/cucumber/godog/colors fmt: + description: "Run go fmt" steps: - run: test -z "$(go fmt ./...)" godog: + description: "Run godog" steps: - run: godog -f progress go_test: + description: "Run go test" steps: - run: go test -v -race -coverprofile=coverage.txt -covermode=atomic all: + description: "Run all commands against godog code" steps: - env - vet From c226b7c396cce22e8b73da1b5e5d0c2ca74cfda3 Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 19:36:41 -0700 Subject: [PATCH 04/16] Remove env step, move env to circle ui --- .circleci/config.yml | 10 ---------- 1 file changed, 10 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6184651..e981900 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -12,15 +12,6 @@ executors: - image: circleci/golang:1.13 commands: - env: - description: "Setup environment variables" - steps: - - run: - command: | - export GOROOT=/usr/local/go - export GOPATH=$HOME/go - export GO111MODULE=on - export PATH=$GOPATH/bin:$GOROOT/bin:$PATH vet: description: "Run go vet" steps: @@ -46,7 +37,6 @@ commands: all: description: "Run all commands against godog code" steps: - - env - vet - fmt - godog From 170477647221c01108185a0f785a9c44bee14ad1 Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 19:40:57 -0700 Subject: [PATCH 05/16] Test env in executor and only 1.11 for now --- .circleci/config.yml | 10 +++++++--- 1 file changed, 7 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index e981900..31c8bb1 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -3,7 +3,11 @@ version: 2.1 executors: go1_11: docker: - - image: circleci/golang:1.11 + - image: circleci/golang:1.11 + environment: + - GOROOT: /usr/local/go + - GOPATH: $HOME/go + - PATH: $GOPATH/bin:$GOROOT/bin:$PATH go1_12: docker: - image: circleci/golang:1.12 @@ -67,5 +71,5 @@ workflows: test: jobs: - go1_11 - - go1_12 - - go1_13 + # - go1_12 + # - go1_13 From 60c89de5431ebfa86c108d5572bffaae862eba7f Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 19:50:14 -0700 Subject: [PATCH 06/16] Update env --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 31c8bb1..baf7e0e 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,9 +5,9 @@ executors: docker: - image: circleci/golang:1.11 environment: - - GOROOT: /usr/local/go - - GOPATH: $HOME/go - - PATH: $GOPATH/bin:$GOROOT/bin:$PATH + - GOROOT: "/usr/local/go" + - GOPATH: "/go" + - PATH: ${GOPATH}/bin:${GOROOT}/bin:${PATH} go1_12: docker: - image: circleci/golang:1.12 From a32b67ce625e4fdf9245a9d67860917cea77b8df Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 19:54:53 -0700 Subject: [PATCH 07/16] Update yml for env --- .circleci/config.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index baf7e0e..fd192b3 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -5,9 +5,9 @@ executors: docker: - image: circleci/golang:1.11 environment: - - GOROOT: "/usr/local/go" - - GOPATH: "/go" - - PATH: ${GOPATH}/bin:${GOROOT}/bin:${PATH} + GOROOT: "/usr/local/go" + GOPATH: "/go" + PATH: $GOPATH/bin:$GOROOT/bin:$PATH go1_12: docker: - image: circleci/golang:1.12 From 31fb05dbeb380c2f93abc10ac7472e353d61d2d1 Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 20:00:30 -0700 Subject: [PATCH 08/16] Pare down to just 1.11 for now --- .circleci/config.yml | 31 ++++--------------------------- 1 file changed, 4 insertions(+), 27 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index fd192b3..e3a2db8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -1,19 +1,11 @@ version: 2.1 executors: - go1_11: + exec_go_1_11: docker: - - image: circleci/golang:1.11 + - image: circleci/golang:1.11.13 environment: - GOROOT: "/usr/local/go" - GOPATH: "/go" - PATH: $GOPATH/bin:$GOROOT/bin:$PATH - go1_12: - docker: - - image: circleci/golang:1.12 - go1_13: - docker: - - image: circleci/golang:1.13 + CGO_ENABLED: 0 commands: vet: @@ -49,27 +41,12 @@ commands: jobs: go1_11: working_directory: /go/src/github.com/cucumber/godog - executor: go1_11 + executor: exec_go_1_11 steps: - all - go1_12: - working_directory: /go/src/github.com/cucumber/godog - executor: go1_12 - steps: - - all - - go1_13: - working_directory: /go/src/github.com/cucumber/godog - executor: go1_13 - steps: - - all - - workflows: version: 2 test: jobs: - go1_11 - # - go1_12 - # - go1_13 From 9ae9281bfd6e9f53f649d4a64b352ff1e0312c70 Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 20:17:59 -0700 Subject: [PATCH 09/16] Let's actually checkout the code! --- .circleci/config.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/.circleci/config.yml b/.circleci/config.yml index e3a2db8..008d790 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -33,6 +33,7 @@ commands: all: description: "Run all commands against godog code" steps: + - checkout - vet - fmt - godog From 2da0f57110a9b454fc47f9ad43d8f31d8510860e Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 20:24:58 -0700 Subject: [PATCH 10/16] Try installing first --- .circleci/config.yml | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 008d790..6fb947d 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -34,8 +34,9 @@ commands: description: "Run all commands against godog code" steps: - checkout - - vet - - fmt + # - vet + # - fmt + - run: GO111MODULE=off go install ./cmd/godog - godog - go_test From 5fbb84e69cd9c3d9d11a6cb467403764f7fe5efe Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 20:38:51 -0700 Subject: [PATCH 11/16] Remove env and refactor install to command --- .circleci/config.yml | 12 +++++++----- 1 file changed, 7 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 6fb947d..661b654 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,8 +4,6 @@ executors: exec_go_1_11: docker: - image: circleci/golang:1.11.13 - environment: - CGO_ENABLED: 0 commands: vet: @@ -20,6 +18,10 @@ commands: steps: - run: test -z "$(go fmt ./...)" + install_cmd: + steps: + - run: GO111MODULE=off go install ./cmd/godog + godog: description: "Run godog" steps: @@ -34,9 +36,9 @@ commands: description: "Run all commands against godog code" steps: - checkout - # - vet - # - fmt - - run: GO111MODULE=off go install ./cmd/godog + - vet + - fmt + - install_cmd - godog - go_test From bf08467b98c9305ecf68b36c3335b787b3d5a56c Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 20:45:47 -0700 Subject: [PATCH 12/16] Add back 1.12 and 1.13 with some formatting --- .circleci/config.yml | 23 ++++++++++++++++++----- 1 file changed, 18 insertions(+), 5 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 661b654..26029d8 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -4,6 +4,12 @@ executors: exec_go_1_11: docker: - image: circleci/golang:1.11.13 + exec_go_1_12: + docker: + - image: circleci/golang:1.12.16 + exec_go_1_13: + docker: + - image: circleci/golang:1.13.7 commands: vet: @@ -12,26 +18,21 @@ commands: - run: go vet github.com/cucumber/godog - run: go vet github.com/cucumber/godog/gherkin - run: go vet github.com/cucumber/godog/colors - fmt: description: "Run go fmt" steps: - run: test -z "$(go fmt ./...)" - install_cmd: steps: - run: GO111MODULE=off go install ./cmd/godog - godog: description: "Run godog" steps: - run: godog -f progress - go_test: description: "Run go test" steps: - run: go test -v -race -coverprofile=coverage.txt -covermode=atomic - all: description: "Run all commands against godog code" steps: @@ -48,9 +49,21 @@ jobs: executor: exec_go_1_11 steps: - all + go1_12: + working_directory: /go/src/github.com/cucumber/godog + executor: exec_go_1_12 + steps: + - all + go1_13: + working_directory: /go/src/github.com/cucumber/godog + executor: exec_go1_13 + steps: + - all workflows: version: 2 test: jobs: - go1_11 + - go1_12 + - go1_13 From d874d38bada6eebaf4eb527ef6f305c40ebfadef Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 20:46:29 -0700 Subject: [PATCH 13/16] Fix executor name --- .circleci/config.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 26029d8..f326ce0 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -56,7 +56,7 @@ jobs: - all go1_13: working_directory: /go/src/github.com/cucumber/godog - executor: exec_go1_13 + executor: exec_go_1_13 steps: - all From 0152c420cfa07b0eef6d1c9efa15d8ebe90ec3bd Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 20:59:51 -0700 Subject: [PATCH 14/16] Add golint and refactor godog install --- .circleci/config.yml | 9 +++++++-- 1 file changed, 7 insertions(+), 2 deletions(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index f326ce0..2192b62 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -22,12 +22,16 @@ commands: description: "Run go fmt" steps: - run: test -z "$(go fmt ./...)" - install_cmd: + lint: + description: "Run golint" steps: - - run: GO111MODULE=off go install ./cmd/godog + - run: go get -u golang.org/x/lint/golint + - run: golint ./godog + - run: golint ./cmd/godog/main.go godog: description: "Run godog" steps: + - run: GO111MODULE=off go install ./cmd/godog - run: godog -f progress go_test: description: "Run go test" @@ -39,6 +43,7 @@ commands: - checkout - vet - fmt + - lint - install_cmd - godog - go_test From 0d5dd693b61c8c4dc364e481aeed303ea2cda7ac Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 21:03:00 -0700 Subject: [PATCH 15/16] Remove missing step --- .circleci/config.yml | 1 - 1 file changed, 1 deletion(-) diff --git a/.circleci/config.yml b/.circleci/config.yml index 2192b62..a577fff 100644 --- a/.circleci/config.yml +++ b/.circleci/config.yml @@ -44,7 +44,6 @@ commands: - vet - fmt - lint - - install_cmd - godog - go_test From df4c5e5c9f7e5269a4796b2ed95afdd843ce498d Mon Sep 17 00:00:00 2001 From: Jayson Smith Date: Thu, 6 Feb 2020 22:25:04 -0700 Subject: [PATCH 16/16] Delete .travis.yml --- .travis.yml | 25 ------------------------- 1 file changed, 25 deletions(-) delete mode 100644 .travis.yml diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index ef4bdf3..0000000 --- a/.travis.yml +++ /dev/null @@ -1,25 +0,0 @@ -language: go -go: - - 1.5.x - - 1.6.x - - 1.7.x - - 1.8.x - - 1.9.x - - 1.10.x - - 1.11.x - - 1.12.x - -go_import_path: github.com/DATA-DOG/godog - -install: go install github.com/DATA-DOG/godog/cmd/godog - -script: - - go vet github.com/DATA-DOG/godog - - go vet github.com/DATA-DOG/godog/gherkin - - go vet github.com/DATA-DOG/godog/colors - - test -z "$(go fmt ./...)" # fail if not formatted properly - - godog -f progress - - go test -v -race -coverprofile=coverage.txt -covermode=atomic - -after_success: - - bash <(curl -s https://codecov.io/bash)