Skip to content

Commit b02025c

Browse files
authored
Integrate CodeCov (#4)
* Integrate `CodeCov` * Update `CHANGELOG.md`
1 parent 37533fe commit b02025c

3 files changed

Lines changed: 61 additions & 3 deletions

File tree

.github/workflows/ci.yml

Lines changed: 7 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -49,4 +49,10 @@ jobs:
4949
steps:
5050
- uses: actions/checkout@v3
5151
- name: ${{ matrix.name }}
52-
run: xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean
52+
run: xcodebuild test -scheme "${{ matrix.scheme }}" -destination "${{ matrix.destination }}" clean -enableCodeCoverage YES -resultBundlePath "./${{ matrix.sdk }}.xcresult"
53+
- name: Upload coverage reports to Codecov
54+
uses: codecov/[email protected]
55+
with:
56+
token: ${{ secrets.CODECOV_TOKEN }}
57+
xcode: true
58+
xcode_archive_path: "./${{ matrix.sdk }}.xcresult"

CHANGELOG.md

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,11 +4,15 @@ All notable changes to this project will be documented in this file.
44
## [Unreleased]
55

66
## Added
7+
8+
- Integrate `CodeCov`
9+
- Added in Pull Request [#4](https://github.com/space-code/atomic/pull/4).
10+
711
- Integrate `Danger`
8-
- Added in Pull Request [#2](https://github.com/space-code/atomic/pull/2).
12+
- Added in Pull Request [#3](https://github.com/space-code/atomic/pull/3).
913

1014
- Change the locking mechanism from `DispatchSemaphore` to `unfair_lock_os` and add support for `@dynamicMemberLookup`
11-
- Added in Pull Request [#1](https://github.com/space-code/atomic/pull/1).
15+
- Added in Pull Request [#2](https://github.com/space-code/atomic/pull/2).
1216

1317
#### 1.x Releases
1418
- `0.0.x` Releases - [0.0.1](#100)

codecov.yml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
codecov:
2+
# Require CI to pass to show coverage, default yes
3+
require_ci_to_pass: yes
4+
notify:
5+
# Codecov should wait for all CI statuses to complete, default yes
6+
wait_for_ci: yes
7+
8+
coverage:
9+
# Coverage precision range 0-5, default 2
10+
precision: 2
11+
12+
# Direction to round the coverage value - up, down, nearest, default down
13+
round: nearest
14+
15+
# Value range for red...green, default 70...100
16+
range: "70...90"
17+
18+
status:
19+
# Overall project coverage, compare against pull request base
20+
project:
21+
default:
22+
# The required coverage value
23+
target: 50%
24+
25+
# The leniency in hitting the target. Allow coverage to drop by X%
26+
threshold: 5%
27+
28+
# Only measure lines adjusted in the pull request or single commit, if the commit in not in the pr
29+
patch:
30+
default:
31+
# The required coverage value
32+
target: 85%
33+
34+
# Allow coverage to drop by X%
35+
threshold: 50%
36+
changes: no
37+
38+
comment:
39+
# Pull request Codecov comment format.
40+
# diff: coverage diff of the pull request
41+
# files: a list of files impacted by the pull request (coverage changes, file is new or removed)
42+
layout: "diff, files"
43+
44+
# Update Codecov comment, if exists. Otherwise post new
45+
behavior: default
46+
47+
# If true, only post the Codecov comment if coverage changes
48+
require_changes: false

0 commit comments

Comments
 (0)