Skip to content

Commit 99829fd

Browse files
Modify CI workflow for test coverage and reporting
Updated the CI workflow to run tests with coverage and generate coverage reports using swift package.
1 parent 11d84fb commit 99829fd

1 file changed

Lines changed: 6 additions & 5 deletions

File tree

.github/workflows/configuration.yml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,15 @@ jobs:
1919
- uses: SwiftyLab/setup-swift@latest
2020
- name: Build
2121
run: swift build
22-
- name: Run tests
22+
- name: Run tests with coverage
2323
run: swift test --enable-code-coverage
24-
- name: Install llvm-cov plugin
25-
run: brew install llvm
26-
- name: Generate coverage report
27-
run: llvm-cov export -format="lcov" .build/debug/XcodeTargetsPackageTests.xctest/Contents/MacOS/XcodeTargetsPackageTests -instr-profile .build/debug/codecov/default.profdata > info.lcov
24+
- name: Generate coverage report (lcov)
25+
run: swift package generate-coverage-data --output-path info.lcov
2826
- name: Upload coverage reports to Codecov
2927
uses: codecov/codecov-action@v5
3028
with:
3129
token: ${{ secrets.CODECOV_TOKEN }}
3230
slug: michaelversus/XcodeTargets
31+
files: info.lcov
32+
fail_ci_if_error: true
33+
verbose: true

0 commit comments

Comments
 (0)