8000 CONFIG: Add codecov code coverage by adamayoung · Pull Request #164 · adamayoung/TMDb · GitHub
[go: up one dir, main page]

Skip to content
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

CONFIG: Add codecov code coverage #164

Merged
merged 1 commit into from
Mar 27, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
CONFIG: Add codecov code coverage
  • Loading branch information
adamayoung committed Mar 27, 2024
commit 28a95b723ccecc9ee8f7b43b09260d35d52d500b
2 changes: 2 additions & 0 deletions .codecov.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,2 @@
ignore:
- 'Tests'
16 changes: 15 additions & 1 deletion .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -32,7 +32,21 @@ jobs:
run: swift build --build-tests --jobs ${{ env.BUILD_JOB_COUNT }} -Xswiftc -warnings-as-errors

- name: Test
run: swift test --skip-build --parallel --filter TMDbTests
run: swift test --filter TMDbTests --enable-code-coverage

- name: Prepare Code Coverage
run: |
xcrun llvm-cov \
export -format="lcov" \
.build/debug/TMDbPackageTests.xctest/Contents/MacOS/TMDbPackageTests \
-instr-profile .build/debug/codecov/default.profdata > info.lcov

- name: Upload coverage reports to Codecov
uses: codecov/codecov-action@v4
with:
files: info.lcov
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}

- name: Build for Release
run: swift build -c release --jobs ${{ env.BUILD_JOB_COUNT }} -Xswiftc -warnings-as-errors
Expand Down
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -7,3 +7,4 @@ xcuserdata/
.vscode
*.xctestplan
docs/
info.lcov
Loading
0