Skip to content

Commit 8ad80ad

Browse files
committed
Upload coverage in matrix
1 parent 96c72b7 commit 8ad80ad

File tree

1 file changed

+16
-1
lines changed

1 file changed

+16
-1
lines changed

.github/workflows/test-and-coverage.yml

Lines changed: 16 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -48,6 +48,21 @@ jobs:
4848
with:
4949
name: "ResultBundle-${{ matrix.os }}-${{ matrix.arch }}.xcresult"
5050
path: "artifacts/ResultBundle-${{ matrix.os }}-${{ matrix.arch }}.xcresult"
51+
- name: Install Dependencies
52+
run: |
53+
brew install --formula xcresultparser
54+
- name: Convert Merged Result to Coverage
55+
run: |
56+
xcresultparser \
57+
--output-format cobertura \
58+
artifacts/ResultBundle-${{ matrix.os }}-${{ matrix.arch }}.xcresult > artifacts/coverage-${{ matrix.os }}-${{ matrix.arch }}.xml
59+
- name: Upload Coverage to Codecov
60+
uses: codecov/codecov-action@v5
61+
with:
62+
files: artifacts/coverage-${{ matrix.os }}-${{ matrix.arch }}.xml
63+
token: ${{ secrets.CODECOV_TOKEN }}
64+
flags: ${{ matrix.os }}-${{ matrix.arch }}-tests
65+
fail_ci_if_error: true
5166

5267
merge:
5368
runs-on: macos-latest
@@ -138,5 +153,5 @@ jobs:
138153
with:
139154
files: artifacts/coverage.xml
140155
token: ${{ secrets.CODECOV_TOKEN }}
141-
flags: unittests
156+
flags: all_tests
142157
fail_ci_if_error: true

0 commit comments

Comments
 (0)