Skip to content

Commit 5a53ddd

Browse files
committed
Report code coverage to Codecov
1 parent 912a57b commit 5a53ddd

File tree

5 files changed

+30
-0
lines changed

5 files changed

+30
-0
lines changed

.github/codecov.yaml

+5
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
coverage:
2+
status:
3+
project:
4+
default:
5+
threshold: 5%

.github/dependabot.yaml

+8
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
version: 2
2+
updates:
3+
- package-ecosystem: "github-actions"
4+
directory: "/"
5+
schedule:
6+
interval: "weekly"
7+
reviewers:
8+
- "slashmo"

.github/workflows/pull-request.yaml

+1
Original file line numberDiff line numberDiff line change
@@ -12,3 +12,4 @@ jobs:
1212
unit_test:
1313
name: Unit Test
1414
uses: ./.github/workflows/unit-test.yaml
15+
secrets: inherit

.github/workflows/unit-test.yaml

+15
Original file line numberDiff line numberDiff line change
@@ -28,3 +28,18 @@ jobs:
2828
run: swift package resolve
2929
- name: Run Unit Tests
3030
run: swift test --parallel --enable-code-coverage
31+
- name: Merge code coverage
32+
run: |
33+
llvm-cov export -format "lcov" \
34+
.build/debug/swift-ofrepPackageTests.xctest \
35+
-ignore-filename-regex="\/Tests\/" \
36+
-ignore-filename-regex="\/Generated\/" \
37+
-ignore-filename-regex="\/.build\/" \
38+
-instr-profile=./.build/debug/codecov/default.profdata \
39+
> info.lcov
40+
- name: Upload code coverage report to Codecov
41+
uses: codecov/[email protected]
42+
with:
43+
files: ./info.lcov
44+
fail_ci_if_error: true
45+
token: "${{ secrets.CODECOV_TOKEN }}"

README.md

+1
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,7 @@
11
# Swift OFREP
22

33
[![Unit Test](https://github.com/swift-open-feature/swift-ofrep/actions/workflows/unit-test.yaml/badge.svg)](https://github.com/swift-open-feature/swift-ofrep/actions/workflows/unit-test.yaml)
4+
[![codecov](https://codecov.io/gh/swift-open-feature/swift-ofrep/graph/badge.svg?token=YK7Y25KOFU)](https://codecov.io/gh/swift-open-feature/swift-ofrep)
45

56
A cross-platform [OFREP](https://github.com/open-feature/protocol) provider for Swift,
67
based on [Swift OpenFeature](https://github.com/swift-open-feature/swift-open-feature).

0 commit comments

Comments
 (0)