1
1
version : 2.1
2
- jobs :
3
- build :
2
+ executors :
3
+ current-go :
4
4
docker :
5
5
- image : circleci/golang:1.15
6
+ prior-go :
7
+ docker :
8
+ - image : circleci/golang:1.14
9
+
10
+ build-template : &build-template
11
+ environment :
12
+ TEST_RESULTS : /tmp/test-results # path to where test results will be saved
6
13
7
- environment :
8
- TEST_RESULTS : /tmp/test-results # path to where test results will be saved
14
+ steps :
15
+ - checkout
16
+ - run : mkdir -p $TEST_RESULTS # create the test results directory
9
17
10
- steps :
11
- - checkout
12
- - run : mkdir -p $TEST_RESULTS # create the test results directory
18
+ - restore_cache : # restores saved cache if no changes are detected since last run
19
+ keys :
20
+ - go-pkg-mod-{{ checksum "go.sum" }}
13
21
14
- - restore_cache : # restores saved cache if no changes are detected since last run
15
- keys :
16
- - go-pkg-mod-{{ checksum "go.sum" }}
22
+ - run :
23
+ name : " Precommit and Coverage Report"
24
+ command : |
25
+ make ci
26
+ find . -name 'coverage.html' > "${TEST_RESULTS}/coverage.lst"
27
+ tar -n -cf - -T "${TEST_RESULTS}/coverage.lst" | tar -C "${TEST_RESULTS}" -xvf -
17
28
18
- - run :
19
- name : " Precommit and Coverage Report"
20
- command : |
21
- make ci
22
- find . -name 'coverage.html' > "${TEST_RESULTS}/coverage.lst"
23
- tar -n -cf - -T "${TEST_RESULTS}/coverage.lst" | tar -C "${TEST_RESULTS}" -xvf -
29
+ - save_cache :
30
+ key : go-pkg-mod-{{ checksum "go.sum" }}
31
+ paths :
32
+ - " /go/pkg/mod"
24
33
25
- - save_cache :
26
- key : go-pkg-mod-{{ checksum "go.sum" }}
27
- paths :
28
- - " /go/pkg/mod"
34
+ - store_artifacts :
35
+ path : /tmp/test-results
36
+ destination : opentelemetry-go-contrib-test-output
29
37
30
- - store_artifacts :
31
- path : /tmp/test-results
32
- destination : opentelemetry-go-contrib-test-output
38
+ - store_test_results :
39
+ path : /tmp/test-results
40
+
41
+ jobs :
42
+ current-go :
43
+ executor : current-go
44
+ << : *build-template
45
+
46
+ prior-go :
47
+ executor : prior-go
48
+ << : *build-template
33
49
34
- - store_test_results :
35
- path : /tmp/test-results
36
-
37
50
integration :
38
51
39
52
parameters :
@@ -71,10 +84,12 @@ workflows:
71
84
version : 2.1
72
85
build_and_test :
73
86
jobs :
74
- - build
87
+ - current-go
88
+ - prior-go
89
+
75
90
integration_test :
76
91
jobs :
77
92
- integration :
78
93
matrix :
79
94
parameters :
80
- target : [test-gocql, test-mongo-driver, test-gomemcache]
95
+ target : [test-gocql, test-mongo-driver, test-gomemcache]
0 commit comments