Skip to content

Commit

Permalink
Report code coverage to Codecov
Browse files Browse the repository at this point in the history
  • Loading branch information
slashmo committed Jan 13, 2025
1 parent 912a57b commit 5a53ddd
Show file tree
Hide file tree
Showing 5 changed files with 30 additions and 0 deletions.
5 changes: 5 additions & 0 deletions .github/codecov.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,5 @@
coverage:
status:
project:
default:
threshold: 5%
8 changes: 8 additions & 0 deletions .github/dependabot.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
version: 2
updates:
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "weekly"
reviewers:
- "slashmo"
1 change: 1 addition & 0 deletions .github/workflows/pull-request.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -12,3 +12,4 @@ jobs:
unit_test:
name: Unit Test
uses: ./.github/workflows/unit-test.yaml
secrets: inherit
15 changes: 15 additions & 0 deletions .github/workflows/unit-test.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -28,3 +28,18 @@ jobs:
run: swift package resolve
- name: Run Unit Tests
run: swift test --parallel --enable-code-coverage
- name: Merge code coverage
run: |
llvm-cov export -format "lcov" \
.build/debug/swift-ofrepPackageTests.xctest \
-ignore-filename-regex="\/Tests\/" \
-ignore-filename-regex="\/Generated\/" \
-ignore-filename-regex="\/.build\/" \
-instr-profile=./.build/debug/codecov/default.profdata \
> info.lcov
- name: Upload code coverage report to Codecov
uses: codecov/[email protected]
with:
files: ./info.lcov
fail_ci_if_error: true
token: "${{ secrets.CODECOV_TOKEN }}"
1 change: 1 addition & 0 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,6 +1,7 @@
# Swift OFREP

[![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)
[![codecov](https://codecov.io/gh/swift-open-feature/swift-ofrep/graph/badge.svg?token=YK7Y25KOFU)](https://codecov.io/gh/swift-open-feature/swift-ofrep)

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

0 comments on commit 5a53ddd

Please sign in to comment.