codecov / codecov-bash

Global coverage report uploader for Codecov
https://codecov.io
Apache License 2.0
234 stars 155 forks source link

fail if release fails. fixes #446 #447

Closed matthewberryman closed 3 years ago

matthewberryman commented 3 years ago

Purpose

Your other packages e.g. https://github.com/codecov/codecov-circleci-orb rely on the assumption that published versions are versioned in github c.f. https://github.com/codecov/codecov-circleci-orb/issues/92 . However if a new version of codecov is added without the version string bumped, then you will publish the bash script but not version in github because not all errors in the version.sh script (without this change) are caught and passed out to CircleCI.

Notable Changes

Because of the way this change then interacts with the existing .circleci/config.yml script, errors on versioning will now be caught and prevent publishing if there is a problem, preventing this mismatch in future.

This will rely on the version string in the codecov script being updated when you want to release (which is required for changes to the bash script), and noting I haven't done this as I wanted to keep this PR for just the issue at hand and didn't want to force a release on merge.

Tests and Risks?

It adds a test in your CI to ensure that all parts of version.sh run.

Update the SHA hash files

n/a - a change to your CI script

codecov[bot] commented 3 years ago

Codecov Report

Merging #447 (3355447) into master (c3ccd59) will not change coverage. The diff coverage is 0.00%.

Impacted file tree graph

@@           Coverage Diff           @@
##           master     #447   +/-   ##
=======================================
  Coverage   45.82%   45.82%           
=======================================
  Files          20       20           
  Lines        2859     2859           
=======================================
  Hits         1310     1310           
  Misses       1549     1549           
Flag Coverage Δ
test 39.22% <0.00%> (ø)

Flags with carried forward coverage won't be shown. Click here to find out more.

Impacted Files Coverage Δ
scripts/version.sh 0.00% <0.00%> (ø)

Continue to review full report at Codecov.

Legend - Click here to learn more Δ = absolute <relative> (impact), ø = not affected, ? = missing data Powered by Codecov. Last update c3ccd59...3355447. Read the comment docs.

thomasrockhu commented 3 years ago

Thanks @matthewberryman!