Skip to content

Commit

Permalink
Remove Codecov third party orb dependency in CI (#898)
Browse files Browse the repository at this point in the history
Summary:
Pull Request resolved: #898

Restores CI runs following #888, where our CircleCI security policy prevents the use of any third party orbs.

https://pxl.cl/2lbJL

Reviewed By: robhogan

Differential Revision: D41436440

fbshipit-source-id: da0ce96232658058304de4e81145084521414b7a
  • Loading branch information
huntie authored and jacdebug committed Dec 1, 2022
1 parent eecd260 commit 710bbae
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 3 deletions.
9 changes: 6 additions & 3 deletions .circleci/config.yml
Expand Up @@ -4,7 +4,6 @@
version: 2.1

orbs:
codecov: codecov/codecov@3.2.4
win: circleci/windows@2.4.0

references:
Expand Down Expand Up @@ -70,8 +69,12 @@ jobs:
- checkout
- yarn_install
- run: yarn test-coverage
- codecov/upload:
file: ./coverage/coverage-final.json
- run:
name: Download Codecov Uploader
command: ./.circleci/scripts/install_codecov.sh
- run:
name: Upload coverage results
command: ./codecov -t ${CODECOV_TOKEN} -f ./coverage/coverage-final.json

test-linux:
<<: *secure_unset_publish_token
Expand Down
16 changes: 16 additions & 0 deletions .circleci/scripts/install_codecov.sh
@@ -0,0 +1,16 @@
#!/bin/sh

# Install Codecov Uploader
# See https://docs.codecov.com/docs/codecov-uploader#using-the-uploader-with-codecovio-cloud

CODECOV_URL="https://uploader.codecov.io"

curl "${CODECOV_URL}/verification.gpg" | gpg --no-default-keyring --keyring trustedkeys.gpg --import
curl -Os "${CODECOV_URL}/latest/linux/codecov"
curl -Os "${CODECOV_URL}/latest/linux/codecov.SHA256SUM"
curl -Os "${CODECOV_URL}/latest/linux/codecov.SHA256SUM.sig"

gpgv codecov.SHA256SUM.sig codecov.SHA256SUM
shasum -a 256 -c codecov.SHA256SUM

chmod +x codecov

0 comments on commit 710bbae

Please sign in to comment.