-
Notifications
You must be signed in to change notification settings - Fork 3
/
config.yml
68 lines (65 loc) · 1.55 KB
/
config.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
version: 2.1
commands:
go_get:
steps:
- restore_cache:
key: go-mod-{{ checksum "go.sum" }}
- run: go get ./...
- save_cache:
paths:
- /go/pkg/mod
key: go-mod-{{ checksum "go.sum" }}
jobs:
lint:
docker:
- image: circleci/golang:1.12
steps:
- checkout
- go_get
- run:
name: Install golangci-lint
command: curl -sfL https://install.goreleaser.com/github.com/golangci/golangci-lint.sh | sh -s v1.15.0
- run: ./bin/golangci-lint run
test_go:
docker:
- image: circleci/golang:1.12
steps:
- checkout
- go_get
- run: hack/download-test-assets.sh
- run: hack/run-test.sh
- store_test_results:
path: reports/junit
- run: bash <(curl -s https://codecov.io/bash)
release:
docker:
- image: circleci/golang:1.12
steps:
- checkout
- setup_remote_docker
- run:
name: Login to Docker Hub
command: echo "$DOCKER_PASSWORD" | docker login -u "$DOCKER_USERNAME" --password-stdin
- go_get
- run: curl -sL https://git.io/goreleaser | bash
workflows:
version: 2
main:
jobs:
- lint:
filters:
tags:
only: /.*/
- test_go:
filters:
tags:
only: /.*/
- release:
requires:
- lint
- test_go
filters:
branches:
ignore: /.*/
tags:
only: /^v[0-9]+(\.[0-9]+)*(-.*)*$/