Skip to content

Commit f8d47a0

Browse files
committed
fix: codecov again
1 parent 0805b3f commit f8d47a0

File tree

3 files changed

+30
-7
lines changed

3 files changed

+30
-7
lines changed

.github/workflows/codecov.yml

Lines changed: 25 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -47,16 +47,36 @@ jobs:
4747
4848
- name: Generate Coverage Report
4949
run: |
50-
xcrun xccov view --report --json ./DerivedData-${{ matrix.platform.name }}/Logs/Test/*.xcresult > coverage-${{ matrix.platform.name }}.json
50+
# Find the xcresult bundle
51+
XCRESULT_PATH=$(find ./DerivedData-${{ matrix.platform.name }}/Logs/Test -name '*.xcresult' | head -1)
52+
53+
if [ -z "$XCRESULT_PATH" ]; then
54+
echo "No .xcresult file found"
55+
ls -la ./DerivedData-${{ matrix.platform.name }}/Logs/Test/
56+
exit 1
57+
fi
58+
59+
echo "Found xcresult at: $XCRESULT_PATH"
60+
61+
# Generate coverage reports in different formats
62+
xcrun xccov view --report --json "$XCRESULT_PATH" > coverage-${{ matrix.platform.name }}.json
63+
xcrun xccov view --report "$XCRESULT_PATH" > coverage-${{ matrix.platform.name }}.txt
64+
65+
# List generated files for debugging
66+
ls -la coverage-*
5167
5268
- name: Upload Coverage to Codecov
53-
uses: codecov/codecov-action@v4
69+
uses: codecov/codecov-action@v5
5470
with:
5571
token: ${{ secrets.CODECOV_TOKEN }}
56-
files: ./coverage-${{ matrix.platform.name }}.json
57-
flags: unittests,${{ matrix.platform.name }}
72+
files: ./coverage-${{ matrix.platform.name }}.json,./coverage-${{ matrix.platform.name }}.txt
73+
flags: ${{ matrix.platform.name }}
5874
name: codecov-${{ matrix.platform.name }}
59-
fail_ci_if_error: true
75+
fail_ci_if_error: false
76+
verbose: true
77+
override_branch: main
78+
override_commit: ${{ github.sha }}
79+
override_pr: ${{ github.event.number }}
6080

6181
# Status Check
6282
status-check:

README.md

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,6 +13,9 @@
1313
<a href="https://swiftpackageindex.com/EFPrefix/EFQRCode">
1414
<img src="https://img.shields.io/endpoint?url=https%3A%2F%2Fswiftpackageindex.com%2Fapi%2Fpackages%2FEFPrefix%2FEFQRCode%2Fbadge%3Ftype%3Dplatforms" alt="Compatible with all Platforms">
1515
</a>
16+
<a href="https://codecov.io/gh/EFPrefix/EFQRCode" >
17+
<img src="https://codecov.io/gh/EFPrefix/EFQRCode/graph/badge.svg?token=0nqbfZHB4O"/>
18+
</a>
1619
<a href="https://raw.githubusercontent.com/EFPrefix/EFQRCode/main/LICENSE">
1720
<img src="https://img.shields.io/cocoapods/l/EFQRCode.svg?style=flat">
1821
</a>

Tests/Tests.swift

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -77,8 +77,8 @@ class Tests: XCTestCase {
7777
func testExample3() {
7878
// This is an example of EFQRCodeGenerator test case.
7979
let content = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989"
80-
let generator = try? EFQRCode.Generator(content, style: .bubble(params: .init()))
81-
let testResult = try? generator?.toImage(width: 1200).cgImage()
80+
let generator = try? EFQRCode.Generator(content, style: .dsj(params: .init()))
81+
let testResult = try? generator?.toImage(width: 800).cgImage()
8282
XCTAssertNotNil(testResult, "testResult is nil!")
8383

8484
// This is an example of EFQRCodeRecognizer test case.

0 commit comments

Comments
 (0)