Skip to content

Commit

Permalink
fix(coverage): fixing test coverage calc (#3081)
Browse files Browse the repository at this point in the history
  • Loading branch information
rogeriopeixotocx authored May 4, 2021
1 parent e79e270 commit 51f283a
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions .github/scripts/get-coverage.py
Original file line number Diff line number Diff line change
Expand Up @@ -120,17 +120,17 @@ def main():
args = parse_args()
lines = load_coverage(args)
stats = calc_file_stats(lines)
total = total_cov(stats)
total = round(total_cov(stats))
if os.environ.get('GITHUB_RUN_ID'):
if total >= 90:
color = 'brightgreen'
color = 'brightgreen'
elif total >= 80:
color = 'green'
color = 'green'
elif total >= 75:
color = 'orange'
color = 'orange'
else:
color = 'red'
print("::set-output name=coverage::%.2f" % (total))
color = 'red'
print(f"::set-output name=coverage::{total}")
print(f"::set-output name=color::{color}")
print(f"Total coverage: {total}")

Expand Down

0 comments on commit 51f283a

Please sign in to comment.