spf13--cobra/.circleci/config.yml

43 lines
1 KiB
YAML
Raw Normal View History

2018-02-11 08:22:30 -08: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
curl -Lso bin/shellcheck https://github.com/caarlos0/shellcheck-docker/releases/download/v0.4.6/shellcheck
2018-02-11 08:22:30 -08:00
chmod +x bin/shellcheck
go get -t -v ./...
PATH=$PATH:$PWD/bin go test -v ./...
go build
2018-10-25 20:27:20 +02:00
if [ -n $LATEST_GO ]; then
diff -u <(echo -n) <(gofmt -d -s .);
fi
2018-02-11 08:22:30 -08:00
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-10-25 20:27:20 +02:00
- image: circleci/golang:1.11
2018-02-11 08:22:30 -08:00
<<: *base
go-previous:
docker:
2018-10-25 20:27:20 +02:00
- image: circleci/golang:1.10
2018-02-11 08:22:30 -08:00
<<: *base
go-latest:
docker:
- image: circleci/golang:latest
2018-10-25 20:27:20 +02:00
environment:
LATEST_GO: LATEST_GO
2018-02-11 08:22:30 -08:00
<<: *base