Skip to content

Commit

Permalink
Add coverage job for codecov.io
Browse files Browse the repository at this point in the history
  • Loading branch information
Zachary Scott committed Jun 5, 2018
1 parent a984096 commit cac6d60
Show file tree
Hide file tree
Showing 2 changed files with 27 additions and 1 deletion.
26 changes: 26 additions & 0 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@ workflows:
ci:
jobs:
- test
- coverage
- lint

jobs:
Expand All @@ -15,6 +16,31 @@ jobs:
steps:
- checkout
- run: make test
coverage:
docker:
- image: circleci/golang:1.10
working_directory: /go/src/github.com/circleci/circleci-cli
steps:
- checkout
- run: make cover
- store_artifacts:
path: ./coverage.txt
destination: coverage.txt
- run:
name: Upload code coverage report to codecov.io
command: |
curl -ivX POST -H 'Accept: text/plain' \
--data-binary @coverage.txt \
"https://codecov.io/upload/v2\
?service=circleci\
&token=$CODECOV_TOKEN\
&commit=$CIRCLE_SHA1\
&branch=$CIRCLE_BRANCH\
&build=$CIRCLE_BUILD_NUM\
&job=$CIRCLE_NODE_INDEX\
&build_url=$CIRCLE_BUILD_URL\
&slug=$CIRCLE_PROJECT_USERNAME/$CIRCLE_PROJECT_REPONAME\
&pr=$CIRCLE_PR_NUMBER"
lint:
docker:
- image: circleci/golang:1.10
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
# circleci-cli [![CircleCI](https://circleci.com/gh/circleci/plans-service.svg?style=svg&circle-token=CCCCC)](https://circleci.com/gh/circleci/circleci-cli) [![codecov](https://codecov.io/gh/circleci/circleci-cli/branch/master/graph/badge.svg?token=CCCCC)](https://codecov.io/gh/circleci/circleci-ci)
# circleci-cli [![CircleCI](https://circleci.com/gh/circleci/circleci-cli.svg?style=svg&circle-token=8adb850cb9110a49ab0990f198dd78966f9e6073)](https://circleci.com/gh/circleci/circleci-cli) [![codecov](https://codecov.io/gh/circleci/circleci-cli/branch/master/graph/badge.svg?token=VJMF7kG1Om](https://codecov.io/gh/circleci/circleci-ci)

This project is the seed for CircleCI's new command-line application.

Expand Down

0 comments on commit cac6d60

Please sign in to comment.