carapace-bin/.circleci/config.yml
2020-10-17 20:34:35 +02:00

53 lines
1.2 KiB
YAML

version: 2.1
workflows:
main:
jobs:
- build:
filters:
tags:
ignore: /.*/
tags:
jobs:
- release:
# Only run this job on git tag pushes
filters:
branches:
ignore: /.*/
tags:
only: /v[0-9]+(\.[0-9]+)*(-.*)*/
commands:
run_tests:
steps:
- run:
name: "build"
command: |
go generate ./...
go get -t -v ./...
PATH=$PATH:$PWD/bin go test -v ./...
cd cmd/carapace
go build
go vet
jobs:
build:
docker:
- image: circleci/golang:latest
environment:
GO111MODULE: "on"
steps:
- checkout
- run_tests
- run:
name: "Check formatting"
command: diff -u <(echo -n) <(gofmt -d -s .)
- run:
name: "staticcheck"
command: go get honnef.co/go/tools/cmd/staticcheck && staticcheck ./...
release:
docker:
- image: circleci/golang:1.15
steps:
- checkout
- run: cd cmd/carapace && go generate ./... && curl -sL https://git.io/goreleaser | bash