Skip to content
This repository was archived by the owner on Nov 7, 2022. It is now read-only.

Commit cc82107

Browse files
author
Bogdan Drutu
authored
Add support for codecov. (#427)
1 parent c647c00 commit cc82107

2 files changed

Lines changed: 13 additions & 1 deletion

File tree

.travis.yml

Lines changed: 8 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,4 +11,11 @@ env:
1111

1212
install:
1313
- make install-tools
14-
- go get -t -v ./...
14+
15+
script:
16+
- make fmt
17+
- make lint
18+
- make test-with-coverage
19+
20+
after_success:
21+
- bash <(curl -s https://codecov.io/bash)

Makefile

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
ALL_SRC := $(shell find . -type f -name '*.go' -not -path "./vendor/*")
22

33
GOTEST_OPT?=-v -race -timeout 30s
4+
GOTEST_OPT_WITH_COVERAGE = $(GOTEST_OPT) -coverprofile=coverage.txt -covermode=atomic
45
GOTEST=go test
56
GOFMT=gofmt
67
GOLINT=golint
@@ -23,6 +24,10 @@ default_goal: fmt lint test
2324
test:
2425
$(GOTEST) $(GOTEST_OPT) ./...
2526

27+
.PHONY: test-with-coverage
28+
test-with-coverage:
29+
$(GOTEST) $(GOTEST_OPT_WITH_COVERAGE) ./...
30+
2631
.PHONY: fmt
2732
fmt:
2833
@FMTOUT=`$(GOFMT) -s -l $(ALL_SRC) 2>&1`; \

0 commit comments

Comments
 (0)