Skip to content

Commit

Permalink
Merge pull request #10 from CircleCI-Public/orbs
Browse files Browse the repository at this point in the history
Use an orb for codecov upload
  • Loading branch information
marcomorain authored Jul 2, 2018
2 parents 2bcb180 + 916757f commit 6249964
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/codecov-clojure@0.0.2

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 6249964

Please sign in to comment.