-
Notifications
You must be signed in to change notification settings - Fork 61
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
build: add code coverage reporting to project
- Loading branch information
Showing
5 changed files
with
46 additions
and
21 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,5 +12,8 @@ package-lock.json | |
|
||
# IDE files | ||
*.idea | ||
|
||
.vscode/ | ||
*.log | ||
|
||
# coverage | ||
coverage.txt |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -13,23 +13,27 @@ env: | |
- GO111MODULE=on | ||
|
||
before_install: | ||
- sudo apt-get update | ||
- sudo apt-get install python | ||
- nvm install 12 | ||
- npm install -g [email protected] | ||
- sudo apt-get update | ||
- sudo apt-get install python | ||
- nvm install 12 | ||
- npm install -g [email protected] | ||
|
||
install: | ||
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0 | ||
- curl -sfL https://raw.githubusercontent.com/golangci/golangci-lint/master/install.sh| sh -s -- -b $(go env GOPATH)/bin v1.21.0 | ||
- curl -s https://codecov.io/bash > $HOME/codecov-bash.sh && chmod +x $HOME/codecov-bash.sh | ||
|
||
script: | ||
- make all | ||
- make travis-ci | ||
|
||
after_success: | ||
- build/publishCodeCoverage.sh | ||
|
||
before_deploy: | ||
- pip install --user bump2version | ||
- npm install @semantic-release/changelog | ||
- npm install @semantic-release/exec | ||
- npm install @semantic-release/git | ||
- npm install @semantic-release/github | ||
- pip install --user bump2version | ||
- npm install @semantic-release/changelog | ||
- npm install @semantic-release/exec | ||
- npm install @semantic-release/git | ||
- npm install @semantic-release/github | ||
|
||
deploy: | ||
- provider: script | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,12 @@ | ||
#!/bin/bash | ||
|
||
# This script will publish code coverage info for a build of the master branch | ||
# or a tagged release. | ||
|
||
if [[ -n "${TRAVIS_TAG}" || ${TRAVIS_BRANCH} == "master" ]]; then | ||
printf ">>>>> Publishing code coverage info for branch: %s\n" ${TRAVIS_BRANCH} | ||
$HOME/codecov-bash.sh -f coverage.txt -t $CODECOV_TOKEN | ||
else | ||
printf ">>>>> Bypassing code coverage publish step for feature branch/PR build.\n" | ||
fi | ||
|