Skip to content

Commit

Permalink
Update xcodebuild.yml with fixed coverage data gathering
Browse files Browse the repository at this point in the history
  • Loading branch information
claucambra authored Apr 16, 2024
1 parent b3d786b commit 259e50d
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion .github/workflows/xcodebuild.yml
Original file line number Diff line number Diff line change
Expand Up @@ -24,7 +24,13 @@ jobs:
- name: Build and test
run: xcodebuild clean build test -scheme NextcloudFileProviderKit -destination "platform=macOS,name=Any Mac" -enableCodeCoverage YES -derivedDataPath "$PWD/.derivedData"
- name: Gather code coverage
run: xcrun llvm-cov export -format="lcov" "$PWD/.derivedData/Build/Products/Debug/NextcloudFileProviderKitTests.xctest/Contents/MacOS/NextcloudFileProviderKitTests" -instr-profile "$PWD/.derivedData/Build/Debug/codecov/default.profdata" > coverage_report.lcov
run: |
cd "$PWD/.derivedData/Build/ProfileData"
cd $(ls -d */|head -n 1)
directory=${PWD##*/}
pathCoverage="$PWD/.derivedData/Build/ProfileData/${directory}/Coverage.profdata"
cd ../../../../
xcrun llvm-cov export -format="lcov" -instr-profile $pathCoverage "$PWD/.derivedData/Build/Products/Debug/NextcloudFileProviderKitTests.xctest/Contents/MacOS/NextcloudFileProviderKitTests" > coverage_report.lcov
- name: Upload coverage to Codecov
uses: codecov/codecov-action@v2
with:
Expand Down

0 comments on commit 259e50d

Please sign in to comment.