/
config.yml
46 lines (43 loc) · 952 Bytes
/
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
---
version: 2.1
orbs:
go: circleci/go@1.7.1
jobs:
test:
parameters:
go_version:
type: string
use_gomod_cache:
type: boolean
default: true
docker:
- image: cimg/go:<< parameters.go_version >>
steps:
- checkout
- when:
condition: << parameters.use_gomod_cache >>
steps:
- go/load-cache:
key: v1-go<< parameters.go_version >>
- run: make test
- 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:
# Support the last two go releases, as per https://golang.org/dl/.
- test:
name: go-1-17
go_version: "1.17"
- test:
name: go-1-18
go_version: "1.18"
- test:
name: go-1-19
go_version: "1.19"