Skip to content

Commit

Permalink
Use an orb
Browse files Browse the repository at this point in the history
  • Loading branch information
marcomorain committed Jul 2, 2018
1 parent 2bcb180 commit 12f9554
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 20 deletions.
20 changes: 5 additions & 15 deletions .circleci/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,6 +3,9 @@

version: 2

orbs:
codecov: circleci/[email protected]

executors:
go:
docker:
Expand Down Expand Up @@ -39,21 +42,8 @@ jobs:
- 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"
- codecov/upload:
path: coverage.txt
lint:
executor: go
steps:
Expand Down
8 changes: 3 additions & 5 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,12 +20,10 @@ jobs:
path: ./coverage.txt
destination: coverage.txt
- run:
name: Upload code coverage report to codecov.io
name: Upload Coverage Results
command: |
curl -ivX POST -H 'Accept: text/plain' \
--data-binary @coverage.txt \
"https://codecov.io/upload/v2\
?service=circleci\
curl --request POST --retry 3 --silent --show-error --fail --data-binary @coverage.txt \
"https://codecov.io/upload/v2?service=circleci\
&token=$CODECOV_TOKEN\
&commit=$CIRCLE_SHA1\
&branch=$CIRCLE_BRANCH\
Expand Down

0 comments on commit 12f9554

Please sign in to comment.