Skip to content

Commit

Permalink
Add CodeCov badge
Browse files Browse the repository at this point in the history
  • Loading branch information
ns-vasilev committed Oct 15, 2023
1 parent 1494011 commit 2ead79f
Show file tree
Hide file tree
Showing 2 changed files with 49 additions and 0 deletions.
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,7 @@
<a href="https://developer.apple.com/swift"><img alt="5.7" src="https://img.shields.io/badge/language-Swift5.7-orange.svg"/></a>
<a href="https://github.com/space-code/objects-factory"><img alt="CI" src="https://github.com/space-code/objects-factory/actions/workflows/ci.yml/badge.svg?branch=main"></a>
<a href="https://github.com/apple/swift-package-manager" alt="objects-factory on Swift Package Manager" title="objects-factory on Swift Package Manager"><img src="https://img.shields.io/badge/Swift%20Package%20Manager-compatible-brightgreen.svg" /></a>
<a href="https://codecov.io/gh/space-code/objects-factory"><img alt="CodeCov" src="https://codecov.io/gh/space-code/objects-factory/graph/badge.svg?token=NSI8N7Q9JB"></a>
</p>

## Description
Expand Down
48 changes: 48 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,48 @@
codecov:
# Require CI to pass to show coverage, default yes
require_ci_to_pass: yes
notify:
# Codecov should wait for all CI statuses to complete, default yes
wait_for_ci: yes

coverage:
# Coverage precision range 0-5, default 2
precision: 2

# Direction to round the coverage value - up, down, nearest, default down
round: nearest

# Value range for red...green, default 70...100
range: "70...90"

status:
# Overall project coverage, compare against pull request base
project:
default:
# The required coverage value
target: 50%

# The leniency in hitting the target. Allow coverage to drop by X%
threshold: 5%

# Only measure lines adjusted in the pull request or single commit, if the commit in not in the pr
patch:
default:
# The required coverage value
target: 85%

# Allow coverage to drop by X%
threshold: 5%
changes: no

comment:
# Pull request Codecov comment format.
# diff: coverage diff of the pull request
# files: a list of files impacted by the pull request (coverage changes, file is new or removed)
layout: "diff, files"

# Update Codecov comment, if exists. Otherwise post new
behavior: default

# If true, only post the Codecov comment if coverage changes
require_changes: false

0 comments on commit 2ead79f

Please sign in to comment.