-
Notifications
You must be signed in to change notification settings - Fork 320
/
config.yml
67 lines (64 loc) · 1.5 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
---
version: 2.1
orbs:
go: circleci/go@0.2.0
jobs:
test:
parameters:
go_version:
type: string
run_style:
type: boolean
default: false
use_gomod_cache:
type: boolean
default: true
docker:
- image: circleci/golang:<< parameters.go_version >>
working_directory: /go/src/github.com/prometheus/common
steps:
- checkout
- when:
condition: << parameters.use_gomod_cache >>
steps:
- go/load-cache:
key: v1-go<< parameters.go_version >>
- run: make test
- when:
condition: << parameters.run_style >>
steps:
- run: make style
- when:
condition: << parameters.use_gomod_cache >>
steps:
- go/save-cache:
key: v1-go<< parameters.go_version >>
- store_test_results:
path: test-results
workflows:
version: 2
tests:
jobs:
# Supported Go versions are synced with github.com/prometheus/client_golang.
- test:
name: go-1-9
go_version: "1.9"
use_gomod_cache: false
- test:
name: go-1-10
go_version: "1.10"
use_gomod_cache: false
- test:
name: go-1-11
go_version: "1.11"
- test:
name: go-1-12
go_version: "1.12"
- test:
name: go-1-13
go_version: "1.13"
- test:
name: go-1-14
go_version: "1.14"
# Style is only checked against the latest supported Go version.
run_style: true