2018-02-11 19:22:30 +03:00
|
|
|
workflows:
|
|
|
|
version: 2
|
|
|
|
main:
|
|
|
|
jobs:
|
|
|
|
- go-current
|
|
|
|
- go-previous
|
|
|
|
- go-latest
|
|
|
|
base: &base
|
|
|
|
working_directory: /go/src/github.com/spf13/cobra
|
|
|
|
steps:
|
|
|
|
- checkout
|
|
|
|
- run:
|
|
|
|
name: "All Commands"
|
|
|
|
command: |
|
|
|
|
mkdir -p bin
|
2018-04-23 15:47:20 +03:00
|
|
|
curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.4.6/shellcheck
|
2018-02-11 19:22:30 +03:00
|
|
|
chmod +x bin/shellcheck
|
|
|
|
go get -t -v ./...
|
|
|
|
PATH=$PATH:$PWD/bin go test -v ./...
|
|
|
|
go build
|
|
|
|
diff -u <(echo -n) <(gofmt -d -s .)
|
|
|
|
if [ -z $NOVET ]; then
|
|
|
|
diff -u <(echo -n) <(go tool vet . 2>&1 | grep -vE 'ExampleCommand|bash_completions.*Fprint');
|
|
|
|
fi
|
|
|
|
version: 2
|
|
|
|
jobs:
|
|
|
|
go-current:
|
|
|
|
docker:
|
2018-03-21 17:39:34 +03:00
|
|
|
- image: circleci/golang:1.10.0
|
2018-02-11 19:22:30 +03:00
|
|
|
<<: *base
|
|
|
|
go-previous:
|
|
|
|
docker:
|
2018-03-21 17:39:34 +03:00
|
|
|
- image: circleci/golang:1.9.4
|
2018-02-11 19:22:30 +03:00
|
|
|
<<: *base
|
|
|
|
go-latest:
|
|
|
|
docker:
|
|
|
|
- image: circleci/golang:latest
|
|
|
|
<<: *base
|