Skip to content
This repository has been archived by the owner on Jul 16, 2021. It is now read-only.

Commit

Permalink
Browse files Browse the repository at this point in the history
Add integration test to code coverage metrics (#1010)
Go 1.10 removes the need to run each test separately with the -coverprofile flag.

* Include integration tests in coverage
* Remove parallel from travis build script.
* codecovio automatically merges coverage profiles
  • Loading branch information
gdbelvin committed Jul 6, 2018
1 parent aa51994 commit 6c6f87b
Show file tree
Hide file tree
Showing 4 changed files with 4 additions and 10 deletions.
1 change: 1 addition & 0 deletions .gitignore
Expand Up @@ -14,3 +14,4 @@ genfiles/*
travis_secrets.tar.gz
service_key.json
client_secret*.json
coverage.txt
5 changes: 2 additions & 3 deletions .travis.yml
Expand Up @@ -17,18 +17,17 @@ addons:
apt:
packages:
- python3-pip
- parallel

install:
- go get -u github.com/alecthomas/gometalinter
- gometalinter --install
- go get -t ./...

script:
- export TRILLIAN_SQL_DRIVER=mysql
- make
- gometalinter --config=gometalinter.json ./...
- ./coverage.sh
- go test ./... -coverprofile=coverage1.txt
- TRILLIAN_SQL_DRIVER=mysql go test ./impl/integration/ -coverprofile=coverage2.txt -coverpkg=./...

after_success:
- bash <(curl -s https://codecov.io/bash)
Expand Down
2 changes: 1 addition & 1 deletion Makefile
Expand Up @@ -36,7 +36,7 @@ test: main
TRILLIAN_SQL_DRIVER=mysql go test ./...

coverage: main
TRILLIAN_SQL_DRIVER=mysql go test ./... -cover
TRILLIAN_SQL_DRIVER=mysql go test ./... -cover

check:
gometalinter --config=gometalinter.json ./...
Expand Down
6 changes: 0 additions & 6 deletions coverage.sh

This file was deleted.

0 comments on commit 6c6f87b

Please sign in to comment.