55 build :
66 working_directory : /go/src/github.com/FactomProject/factom-cli
77 docker :
8- - image : circleci/golang:1.10
8+ - image : circleci/golang:1.15
99
1010 steps :
1111 - checkout
1212
13- - restore_cache :
14- keys :
15- - v1-factom-cli-go-build-cache-{{ checksum "glide.lock" }}
16-
17- - run :
18- name : Get glide
19- command : |
20- go get -v github.com/Masterminds/glide
21- cd $GOPATH/src/github.com/Masterminds/glide
22- git checkout tags/v0.13.1
23- go install
24- - run :
25- name : Get goveralls
26- command : |
27- go get github.com/mattn/goveralls
28- cd $GOPATH/src/github.com/Masterminds/glide
29- git checkout tags/v0.13.1
30- go install
31- - run :
32- name : Get the dependencies
33- command : |
34- glide install
3513 - run :
3614 name : Build and install the executable
3715 command : go install -v
3816
39- - save_cache :
40- key : v1-factom-cli-go-build-cache-{{ checksum "glide.lock" }}
41- paths :
42- - vendor
43-
4417 test :
4518 working_directory : /go/src/github.com/FactomProject/factom-cli
4619 docker :
47- - image : circleci/golang:1.10
20+ - image : circleci/golang:1.15
4821
4922 steps :
5023 - checkout
5124
52- - restore_cache :
53- keys :
54- - v1-factom-cli-go-build-cache-{{ checksum "glide.lock" }}
55-
56- - run :
57- name : Get glide
58- command : |
59- go get -v github.com/Masterminds/glide
60- cd $GOPATH/src/github.com/Masterminds/glide
61- git checkout tags/v0.13.1
62- go install
63- - run :
64- name : Get goveralls
65- command : |
66- go get github.com/mattn/goveralls
67- cd $GOPATH/src/github.com/Masterminds/glide
68- git checkout tags/v0.13.1
69- go install
70- - run :
71- name : Get the dependencies
72- command : |
73- glide install
7425 - run :
7526 name : Build and install the executable
7627 command : go install -v
7728
7829 - run :
7930 name : Run tests!
8031 no_output_timeout : 2400
81- command : go test -v $(glide nv)
82-
83-
84- - save_cache :
85- key : v1-factom-cli-go-build-cache-{{ checksum "glide.lock" }}
86- paths :
87- - vendor
88-
89- # Coveralls configuration is unused as most of the unit testing
90- # lies in the dependency repos.
91- coveralls :
92- working_directory : /go/src/github.com/FactomProject/factomd-cli
93- docker :
94- - image : circleci/golang:1.10
95-
96- steps :
97- - checkout
98-
99- - restore_cache :
100- keys :
101- - v1-factom-cli-go-build-cache-{{ checksum "glide.lock" }}
102-
103- - run :
104- name : Get glide
105- command : |
106- go get -v github.com/Masterminds/glide
107- cd $GOPATH/src/github.com/Masterminds/glide
108- git checkout tags/v0.13.1
109- go install
110- - run :
111- name : Get goveralls
112- command : |
113- go get github.com/mattn/goveralls
114- cd $GOPATH/src/github.com/Masterminds/glide
115- git checkout tags/v0.13.1
116- go install
117- - run :
118- name : Get the dependencies
119- command : |
120- glide install
121- - run :
122- name : Build and install the executable
123- command : go install -v
124-
125- - run :
126- name : Coveralls!
127- no_output_timeout : 2400
128- command : goveralls -v -ignore=$(paste -sd, .coverignore) -service=circle-ci -repotoken=$COVERALLS_TOKEN
129-
130-
131- - save_cache :
132- key : v1-factom-cli-go-build-cache-{{ checksum "glide.lock" }}
133- paths :
134- - vendor
135-
136-
32+ command : go test -v ./...
13733
13834 # Docker builds
13935 docker_build :
@@ -148,12 +44,6 @@ jobs:
14844 - setup_remote_docker :
14945 version : 17.06.0-ce
15046
151- # The main (only) thing we care about is caching the /vendor dir.
152- # Hence, checksumming glide.lock
153- - restore_cache :
154- keys :
155- - v2-factom-cli-docker-cache-{{ checksum "glide.lock" }}
156-
15747 # Load the images if the cache hit
15848 - run :
15949 name : Load Docker image layer cache
@@ -247,18 +137,12 @@ jobs:
247137 docker save -o /images/factom-cli-alpine.tar factom-cli-alpine $(docker history -q factom-cli-alpine |grep -v missing | grep -v none)
248138 docker save -o /images/factom-cli.tar factom-cli $(docker history -q factom-cli |grep -v missing | grep -v none)
249139
250- - save_cache :
251- key : v2-factom-cli-docker-cache-{{ checksum "glide.lock" }}
252- paths :
253- - /images
254140
255141# The flow is
256142# build
257143# |
258144# ---------- test
259145# |
260- # ---------- coveralls
261- # |
262146# ---------- docker_build
263147#
264148#
@@ -267,48 +151,16 @@ workflows:
267151 version : 2
268152 commit-workflow :
269153 jobs :
270- - build :
271- filters :
272- tags :
273- only : /.*/
154+ - build
274155 - test :
275- filters :
276- tags :
277- only : /.*/
278156 requires :
279157 - build
280- # Disabling coveralls for cli repo
281- # - coveralls:
282- # filters:
283- # tags:
284- # only: /.*/
285- # requires:
286- # - test
287158 - docker_build :
288- filters :
289- tags :
290- only : /.*/
291- context : org-global
292- requires :
293- - test
294-
295- scheduled-workflow :
296- triggers :
297- - schedule :
298- cron : " 30 5 * * *"
299159 filters :
300160 branches :
301- only : develop
302- jobs :
303- - build
304- - test :
305- requires :
306- - build
307- # Disabling coveralls for cli repo
308- # - coveralls:
309- # requires:
310- # - test
311- - docker_build :
161+ only :
162+ - develop
163+ - master
312164 context : org-global
313165 requires :
314- - test
166+ - test
0 commit comments