Skip to content

Commit

Permalink
ci: Add codecov (#13)
Browse files Browse the repository at this point in the history
* Create .codecov.yml

* Update ci.yml

* create codecov files

* Update ci.yml

* Update .codecov.yml

* Update README.md

* Update .codecov.yml
  • Loading branch information
cbaker6 authored Jul 8, 2024
1 parent d810768 commit 3fc8ba5
Show file tree
Hide file tree
Showing 4 changed files with 20 additions and 3 deletions.
14 changes: 14 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,14 @@
coverage:
ignore:
- Tests/.*
- TestHost/*
status:
patch:
default:
target: 0
changes: false
project:
default:
target: 2
comment:
require_changes: true
6 changes: 5 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: macos-14
strategy:
matrix:
destination: ['platform=iOS\ Simulator,name=iPhone\ 15\ Pro\ Max', 'platform=watchOS\ Simulator,name=Apple\ Watch\ Series\ 9\ \(41mm\)', 'platform=macOS CODE_SIGN_IDENTITY=""', 'platform=visionOS\ Simulator,OS=1.2,name=Apple\ Vision\ Pro CODE_SIGN_IDENTITY=""']
destination: ['platform=iOS\ Simulator,OS=17.5,name=iPhone\ 15\ Pro\ Max', 'platform=watchOS\ Simulator,name=Apple\ Watch\ Series\ 9\ \(41mm\)', 'platform=macOS CODE_SIGN_IDENTITY=""', 'platform=visionOS\ Simulator,OS=1.2,name=Apple\ Vision\ Pro CODE_SIGN_IDENTITY=""']
action: ['test', 'build']
exclude:
- destination: 'platform=iOS\ Simulator,OS=17.5,name=iPhone\ 15\ Pro\ Max'
Expand All @@ -39,6 +39,9 @@ jobs:
run: set -o pipefail && env NSUnbufferedIO=YES xcodebuild -scheme CareKitEssentials -derivedDataPath DerivedData -destination ${{ matrix.destination }} ${{ matrix.action }} | xcpretty -c
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}
- name: Upload codecov yml
run: |
cat .codecov.yml | curl --data-binary @- https://codecov.io/validate
- name: Prepare codecov
uses: sersoft-gmbh/swift-coverage-action@v4
id: coverage-files
Expand All @@ -52,6 +55,7 @@ jobs:
with:
files: ${{join(fromJSON(steps.coverage-files.outputs.files), ',')}}
fail_ci_if_error: false
token: ${{ secrets.CODECOV_TOKEN }}
env:
DEVELOPER_DIR: ${{ env.CI_XCODE_LATEST }}

1 change: 0 additions & 1 deletion CareKitEssentials.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,6 @@
}
],
"defaultOptions" : {
"codeCoverage" : false,
"testExecutionOrdering" : "random",
"testRepetitionMode" : "retryOnFailure"
},
Expand Down
2 changes: 1 addition & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
[![](https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2Fnetreconlab%2FCareKitEssentials%2Fbadge%3Ftype%3Dplatforms)](https://swiftpackageindex.com/netreconlab/CareKitEssentials)
![Xcode 13.2+](https://img.shields.io/badge/xcode-13.2%2B-blue.svg)
[![CI Status](https://github.com/netreconlab/CareKitEssentials/workflows/ci/badge.svg?branch=main)](https://github.com/netreconlab/CareKitEssentials/actions?query=workflow%3Aci)
![Codecov](https://codecov.io/gh/netreconlab/CareKitEssentials/branches/main/graph/badge.svg)
[![Coverage](https://codecov.io/gh/netreconlab/CareKitEssentialst/branch/main/graph/badge.svg)](https://app.codecov.io/gh/netreconlab/CareKitEssentials/branch/main)
[![License](https://img.shields.io/badge/license-Apache%202.0-blue.svg)](https://github.com/netreconlab/ParseCareKit/#license)

Provides essential cards, views, models, protocols, and extensions to expedite building [CareKit](https://github.com/carekit-apple/CareKit) based applications.
Expand Down

0 comments on commit 3fc8ba5

Please sign in to comment.