Skip to content

Commit 3204dd2

Browse files
authored
ci: add codecov.io support to flux (influxdata#1273)
1 parent f0b6850 commit 3204dd2

3 files changed

Lines changed: 8 additions & 2 deletions

File tree

.circleci/config.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,11 @@ jobs:
3030
- run: make vet
3131
- run: make staticcheck
3232
- run: make checkgenerate
33-
- run: make test
33+
- run: make test GO_TEST_FLAGS='-coverprofile=coverage.txt -covermode=atomic'
34+
- run:
35+
name: Uploading coverage report
36+
command: |
37+
bash <(curl -s https://codecov.io/bash)
3438
- save_cache:
3539
name: Saving GOCACHE
3640
key: flux-gocache-{{ .Branch }}-{{ .Revision }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@ vendor
55
.vscode
66
.vs
77
.tern-project
8+
/coverage.txt

Makefile

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,6 +19,7 @@ GO_ARGS=-tags '$(GO_TAGS)'
1919
export GOOS=$(shell go env GOOS)
2020
export GO_BUILD=env GO111MODULE=on go build $(GO_ARGS)
2121
export GO_TEST=env GO111MODULE=on go test $(GO_ARGS)
22+
export GO_TEST_FLAGS=
2223
# Do not add GO111MODULE=on to the call to go generate so it doesn't pollute the environment.
2324
export GO_GENERATE=go generate $(GO_ARGS)
2425
export GO_VET=env GO111MODULE=on go vet $(GO_ARGS)
@@ -58,7 +59,7 @@ staticcheck:
5859
GO111MODULE=on go run honnef.co/go/tools/cmd/staticcheck ./...
5960

6061
test:
61-
$(GO_TEST) ./...
62+
$(GO_TEST) $(GO_TEST_FLAGS) ./...
6263

6364
test-race:
6465
$(GO_TEST) -race -count=1 ./...

0 commit comments

Comments
 (0)