Skip to content

Update config.yml with SHA check for Codecov#190

Merged
kevinlind merged 12 commits intodevfrom
kevinlind-patch-1
Apr 19, 2021
Merged

Update config.yml with SHA check for Codecov#190
kevinlind merged 12 commits intodevfrom
kevinlind-patch-1

Conversation

@kevinlind
Copy link
Copy Markdown
Contributor

@kevinlind kevinlind commented Apr 16, 2021

Description

Update Codecov publish step to include a check of the SHA hash of the downloaded uploader script. The step will check each of SHA1, SHA256, and SHA512 hashes hosted by Codecov for the specific version of the uploader script which was downloaded. If the shasum check fails, the Circlci step will fail before uploading the coverage reports and in turn fail the build.

https://docs.codecov.io/docs/about-the-codecov-bash-uploader#validating-the-bash-script

Related Issue

Motivation and Context

How Has This Been Tested?

Screenshots (if appropriate):

Types of changes

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to change)

Checklist:

  • I have signed the Adobe Open Source CLA.
  • My code follows the code style of this project.
  • My change requires a change to the documentation.
  • I have updated the documentation accordingly.
  • I have read the CONTRIBUTING document.
  • I have added tests to cover my changes.
  • All new and existing tests passed.

@kevinlind kevinlind marked this pull request as draft April 16, 2021 21:34
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 16, 2021

Codecov Report

Merging #190 (d74ad9a) into dev (b1f1c7c) will decrease coverage by 0.11%.
The diff coverage is n/a.

❗ Current head d74ad9a differs from pull request most recent head 721f3b9. Consider uploading reports for the commit 721f3b9 to get more accurate results

@@            Coverage Diff             @@
##              dev     #190      +/-   ##
==========================================
- Coverage   94.29%   94.18%   -0.11%     
==========================================
  Files          26       25       -1     
  Lines         910      893      -17     
==========================================
- Hits          858      841      -17     
  Misses         52       52              

Add a fake codecov script to validate update to config.yml which fails upload if sha check fails.
Remove the code to download the codecov script used for the sha check. The checked in fake codecov script should be used instead to validate the bash script will fail the upload task.
Override shell in step to upload to Codecov in attempt to ensure a zero exit code is passed.
@kevinlind kevinlind marked this pull request as ready for review April 17, 2021 07:17
@kevinlind kevinlind merged commit b82e080 into dev Apr 19, 2021
@kevinlind kevinlind deleted the kevinlind-patch-1 branch April 19, 2021 17:28
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants