File tree Expand file tree Collapse file tree 6 files changed +42
-74
lines changed Expand file tree Collapse file tree 6 files changed +42
-74
lines changed Original file line number Diff line number Diff line change 11---
22version : 2
3- executorType : docker
4- containerInfo :
5- - image : library/golang
6- environment :
7- AWS_ACCESS_KEY_ID : 1
8- AWS_SECRET_ACCESS_KEY : 1
9- GLIDE_VERSION : 0.12.3
103jobs :
114 build :
12- workdir : " /go/src/github.com/zencoder/go-remote-config"
5+ docker :
6+ - image : circleci/golang
137 steps :
148 - checkout
15- - run :
16- name : Install Glide
17- command : |
18- set -eux
19- curl -sSLfO https://github.com/Masterminds/glide/releases/download/v${GLIDE_VERSION}/glide-v${GLIDE_VERSION}-linux-amd64.tar.gz
20- mkdir glide
21- tar -xzf glide-v${GLIDE_VERSION}-linux-amd64.tar.gz -C ./glide
22- cp ./glide/linux-amd64/glide /usr/local/bin/glide
23- rm -r glide glide-v${GLIDE_VERSION}-linux-amd64.tar.gz
249 - restore_cache :
25- key : glide- {{ checksum "glide.lock " }}
10+ key : go-mod- {{ checksum "go.sum " }}
2611 - run :
27- name : Download vendored Go dependencies
28- command : glide install
12+ name : Download Go dependencies
13+ command : go mod download
2914 - save_cache :
30- key : glide- {{ checksum "glide.lock " }}
15+ key : go-mod- {{ checksum "go.sum " }}
3116 paths :
32- - vendor
33- - run :
34- name : Install required tooling
35- command : |
36- go get golang.org/x/tools/cmd/cover
37- go get github.com/mattn/goveralls
38- go get github.com/modocache/gover
17+ - /go/pkg/mod
3918 - run :
4019 name : Run unit tests
4120 command : |
42- make test
43- - run :
44- name : Collect coverage reports
45- command : |
46- make cover
47- - run :
48- name : Submit coverage to coveralls.io
49- command : |
50- make coveralls
21+ make
22+ experimental :
23+ notify :
24+ branches :
25+ only :
26+ - master
Original file line number Diff line number Diff line change 1- COVERAGEDIR = coverage
2- ifdef CIRCLE_ARTIFACTS
3- COVERAGEDIR = $(CIRCLE_ARTIFACTS )
4- endif
1+ # Force-enable Go modules even if this project has been cloned within a user's GOPATH
2+ export GO111MODULE = on
53
4+ # Specify VERBOSE=1 to get verbose output from all executed commands
65ifdef VERBOSE
76V = -v
7+ X = -x
88else
99.SILENT :
1010endif
1111
12- install-deps :
13- glide install
12+ .PHONY : all
13+ all : build test
14+
15+ .PHONY : clean
16+ clean :
17+ rm -rf bin/ coverage/ cucumber/logs/
18+ go clean -i $(X ) -cache -testcache
19+
20+ .PHONY : build
1421build :
1522 mkdir -p bin
16- go build $(V ) -o bin/go-remote-config
23+ go build $(V ) -o bin/gokay
24+
25+ .PHONY : fmt
1726fmt :
18- go fmt ./...
27+ go fmt $( X ) ./...
1928
20- test : export AWS_ACCESS_KEY_ID := 1
21- test : export AWS_SECRET_ACCESS_KEY := 1
29+ .PHONY : test
2230test :
2331 mkdir -p coverage
24- go test $(V ) ./ -race -cover -coverprofile=$(COVERAGEDIR ) /remoteconfig.coverprofile
32+ go test $(V ) -race -cover -coverprofile coverage/cover.profile ./...
33+
34+ .PHONY : cover
2535cover :
26- go tool cover -html=$(COVERAGEDIR ) /remoteconfig.coverprofile -o $(COVERAGEDIR ) /remoteconfig.html
27- coveralls :
28- gover $(COVERAGEDIR ) $(COVERAGEDIR ) /coveralls.coverprofile
29- goveralls -coverprofile=$(COVERAGEDIR ) /coveralls.coverprofile -service=circle-ci -repotoken=$(COVERALLS_TOKEN )
30- clean :
31- go clean
32- rm -f bin/go-remote-config
33- rm -rf coverage/
36+ go tool cover -html coverage/cover.profile
Load Diff This file was deleted.
Load Diff This file was deleted.
Original file line number Diff line number Diff line change 1+ module github.com/zencoder/go-remote-config
2+
3+ go 1.13
4+
5+ require github.com/stretchr/testify v0.0.0-20151102014159-c478a808a1b3
Original file line number Diff line number Diff line change 1+ github.com/stretchr/testify v0.0.0-20151102014159-c478a808a1b3 h1:jU+Ex9dS6B1VdPZssLnmiZDt/VzsutuuvLNKq8Wl9U0 =
2+ github.com/stretchr/testify v0.0.0-20151102014159-c478a808a1b3 /go.mod h1:a8OnRcib4nhh0OaRAV+Yts87kKdq0PP7pXfy6kDkUVs =
You can’t perform that action at this time.
0 commit comments