Skip to content
This repository has been archived by the owner on Oct 9, 2023. It is now read-only.

Commit

Permalink
Add codecov target and travis test stage (#79)
Browse files Browse the repository at this point in the history
  • Loading branch information
katrogan authored Apr 13, 2020
1 parent a6dc2b0 commit e896333
Show file tree
Hide file tree
Showing 2 changed files with 13 additions and 3 deletions.
4 changes: 4 additions & 0 deletions .travis.yml
Original file line number Diff line number Diff line change
Expand Up @@ -16,3 +16,7 @@ jobs:
install: make install
name: lint
script: make lint
- stage: test
name: unit tests
install: make install
script: make test_unit_codecov
12 changes: 9 additions & 3 deletions boilerplate/lyft/golang_test_targets/Makefile
Original file line number Diff line number Diff line change
Expand Up @@ -39,9 +39,15 @@ test_benchmark:

.PHONY: test_unit_cover
test_unit_cover:
go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -func /tmp/cover.out
go test ./... -coverprofile /tmp/cover.out -covermode=count
go tool cover -func /tmp/cover.out

.PHONY: test_unit_visual
test_unit_visual:
go test ./... -coverprofile /tmp/cover.out -covermode=count; go tool cover -html=/tmp/cover.out

go test ./... -coverprofile /tmp/cover.out -covermode=count
go tool cover -html=/tmp/cover.out

.PHONY: test_unit_codecov
test_unit_codecov:
go test ./... -race -coverprofile=coverage.txt -covermode=atomic
curl -s https://codecov.io/bash > codecov_bash.sh && bash codecov_bash.sh

0 comments on commit e896333

Please sign in to comment.