Skip to content

Commit b637835

Browse files
committed
Run examples during test
1 parent df14358 commit b637835

File tree

2 files changed

+6
-2
lines changed

2 files changed

+6
-2
lines changed

.travis.yml

Lines changed: 5 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,6 +6,10 @@ go:
66
- stable
77
- master
88

9+
install:
10+
# We need goverage to run go tests with -coverprofile for multiple packages
11+
- go get github.com/haya14busa/goverage
12+
913
before_script:
1014
# We don't want to run the demo set test with race condition testing.
1115
# The demo set is large and race tests take a lot longer
@@ -15,7 +19,7 @@ script:
1519
# Run race tests
1620
- go test -v -race -run "$race_tests" -timeout 15m
1721
# We run all tests again to get full coverage, technically unncecessary tho
18-
- go test -v -coverprofile=coverage.txt -coverpkg=$(go list ./... | grep -v msg | awk -vORS=, '{ print $1 }' | sed 's/,$/\n/') -timeout 30m
22+
- goverage -v -timeout 30m -coverprofile=coverage.txt $(go list ./... | grep -v msg | awk -vORS=' ' '{ print $1 }')
1923

2024
after_success:
2125
- bash <(curl -s https://codecov.io/bash)

examples/heatmap/heatmap_test.go

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ import (
66
)
77

88
// Just make sure the example runs
9-
func TestScores(t *testing.T) {
9+
func TestHeatmap(t *testing.T) {
1010
old := os.Stdout
1111
_, w, _ := os.Pipe()
1212
os.Stdout = w

0 commit comments

Comments
 (0)