@@ -53,27 +53,38 @@ jobs:
5353 CODE_SIGNING_ALLOWED=NO \
5454 || echo "Tests completed (some may have failed)"
5555
56+ - name : Install and cache xcresultparser
57+ uses : gerlero/brew-install@main
58+ with :
59+ packages : xcresultparser
60+
5661 - name : Convert Coverage to Codecov Format
5762 run : |
58- xcrun xcresulttool get --format json --path TestResults.xcresult > coverage.json || true
59- # Alternative: Use xcrun llvm-cov for more detailed reports
60- xcrun xccov view --report --json TestResults.xcresult > xccov-report.json || true
63+ xcresultparser --output-format cobertura TestResults.xcresult > coverage.xml
64+ xcresultparser --output-format junit TestResults.xcresult > junit.xml
6165
6266 - name : Upload Coverage to Codecov
6367 uses : codecov/codecov-action@v5
6468 with :
65- files : ./xccov-report.json
66- flags : unittests
69+ files : ./coverage.xml
70+ flags : coverage
6771 name : middledrag-coverage
72+ swift_project : MiddleDrag
6873 fail_ci_if_error : false
6974 verbose : true
7075 env :
7176 CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
7277
7378 - name : Upload Test Results
74- uses : actions/upload-artifact@v4
75- if : always()
79+ uses : codecov/codecov-action@v5
80+ if : ${{ !cancelled() }}
7681 with :
77- name : test-results
78- path : TestResults.xcresult
79- retention-days : 7
82+ report_type : test-results
83+ files : ./junit.xml
84+ flags : unittests
85+ name : middledrag-unittests
86+ swift_project : MiddleDrag
87+ fail_ci_if_error : false
88+ verbose : true
89+ env :
90+ CODECOV_TOKEN : ${{ secrets.CODECOV_TOKEN }}
0 commit comments