-
Notifications
You must be signed in to change notification settings - Fork 2
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
How to set Build path & coverage location #2
Comments
@ShayanPapershift oh I see. how about specifying the eg. steps:
- uses: actions/checkout@v1
- run: arch -arm64 xcodebuild test -project $PROJECT_NAME.xcodeproj -scheme $PROJECT_NAME -configuration Debug -destination 'platform=iOS Simulator,name=${{ matrix.device }},OS=latest' -enableCodeCoverage YES -derivedDataPath DerivedData
- uses: michaelhenry/[email protected]
with:
build-path: DerivedData
target: $PROJECT_NAME.app
is-spm: false
- name: Publish to code climate
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageCommand: arch -arm64 xcodebuild test -scheme $PROJECT_NAME -destination 'platform=iOS Simulator,name=${{ matrix.device }},OS=latest' -enableCodeCoverage YES -disableAutomaticPackageResolution
coverageLocations: |
fastlane/xcov_report |
Works fine, just wanna know how how to upload test coverage for swift packages? |
Here is my CI workflow job, could you please check what am I missing here?
|
@michaelhenry I'm waiting for your response :) |
@ShayanPapershift oops, sorry. Please try to update the ‘is-spm’ to false |
@ShayanPapershift please set the. |
@michaelhenry Same issue, it is not finding the coverage directory. Please note that ApiClient is a Swift package. |
@ShayanPapershift ah i see. please use the swift test --enable-code-coverage |
here is an example: - run: swift test --enable-code-coverage
- uses: michaelhenry/[email protected]
with:
build-path: .build
target: ApiClient.xctest
is-spm: true
output: "coverage/lcov.info"
output-artifact-name: "codeclimate-artifact"
- name: Publish code coverage
uses: paambaati/[email protected]
env:
CC_TEST_REPORTER_ID: ${{ secrets.CC_TEST_REPORTER_ID }}
with:
coverageLocations: |
coverage/lcov.info:lcov |
@michaelhenry thanks for the support. Please update the readme file and add more instruction on how to upload code coverage for Swift packages!. Right now it's really hard to implement the action for swift package. |
@ShayanPapershift you’re welcome. Happy to help. Sounds good to me. Thanks |
I'm unable to set build path and coverage location for my CI workflow, I'm using GitHub actions custom runners with Xcode.
Below is my workflow file
The text was updated successfully, but these errors were encountered: