Skip to content
New issue

Have a question about this project? # for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “#”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? # to your account

Use CodeClimate for tracking code coverage. #104

Open
wants to merge 8 commits into
base: develop
Choose a base branch
from
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
22 changes: 14 additions & 8 deletions .travis.yml
Original file line number Diff line number Diff line change
@@ -1,15 +1,21 @@
sudo: required
env:
global:
- CC_TEST_REPORTER_ID=d69778dd652745be4c5e4857ac992682804eaea8c53470e2f405d089286c107c
language: go
go:
- 1.9.x
- 1.10.x
- 1.11.x
- 1.12.x
before_install:
- go get github.com/mattn/goveralls
- if ! go get github.com/golang/tools/cmd/cover; then go get golang.org/x/tools/cmd/cover; fi
before_script:
# https://github.com/codeclimate/test-reporter/blob/master/examples/go_examples.md
- curl -L https://codeclimate.com/downloads/test-reporter/test-reporter-latest-linux-amd64 > ./cc-test-reporter
- chmod +x ./cc-test-reporter
- ./cc-test-reporter before-build
script:
- go test ./...
- go test -c -covermode=count -coverpkg=github.com/cweill/gotests,github.com/cweill/gotests/internal/input,github.com/cweill/gotests/internal/render,github.com/cweill/gotests/internal/goparser,github.com/cweill/gotests/internal/output,github.com/cweill/gotests/internal/models
- ./gotests.test -test.coverprofile coverage.cov
- $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=coverage.cov
- go test ./... -coverprofile c.out -covermode=count -coverpkg=github.com/cweill/gotests,github.com/cweill/gotests/internal/input,github.com/cweill/gotests/internal/render,github.com/cweill/gotests/internal/goparser,github.com/cweill/gotests/internal/output,github.com/cweill/gotests/internal/models
# - go test -c -covermode=count -coverpkg=github.com/cweill/gotests,github.com/cweill/gotests/internal/input,github.com/cweill/gotests/internal/render,github.com/cweill/gotests/internal/goparser,github.com/cweill/gotests/internal/output,github.com/cweill/gotests/internal/models
# - ./gotests.test -test.coverprofile coverage.cov
# - $HOME/gopath/bin/goveralls -service=travis-ci -coverprofile=coverage.cov
after_script:
- ./cc-test-reporter after-build --exit-code $TRAVIS_TEST_RESULT