diff --git a/.github/workflows/codecov.yml b/.github/workflows/codecov.yml index d6f75f0..0d88c80 100644 --- a/.github/workflows/codecov.yml +++ b/.github/workflows/codecov.yml @@ -21,9 +21,9 @@ jobs: strategy: matrix: platform: - - { name: "iOS", scheme: "iOS Example", destination: "platform=iOS Simulator,name=iPhone 15,OS=latest" } - - { name: "macOS", scheme: "macOS Example", destination: "platform=macOS" } - - { name: "tvOS", scheme: "tvOS Example", destination: "platform=tvOS Simulator,name=Apple TV,OS=latest" } + - { name: "iOS", scheme: "EFQRCode iOS", destination: "platform=iOS Simulator,name=iPhone 15,OS=latest" } + - { name: "macOS", scheme: "EFQRCode macOS", destination: "platform=macOS" } + - { name: "tvOS", scheme: "EFQRCode tvOS", destination: "platform=tvOS Simulator,name=Apple TV,OS=latest" } steps: - name: Checkout Repository @@ -47,16 +47,36 @@ jobs: - name: Generate Coverage Report run: | - xcrun xccov view --report --json ./DerivedData-${{ matrix.platform.name }}/Logs/Test/*.xcresult > coverage-${{ matrix.platform.name }}.json + # Find the xcresult bundle + XCRESULT_PATH=$(find ./DerivedData-${{ matrix.platform.name }}/Logs/Test -name '*.xcresult' | head -1) + + if [ -z "$XCRESULT_PATH" ]; then + echo "No .xcresult file found" + ls -la ./DerivedData-${{ matrix.platform.name }}/Logs/Test/ + exit 1 + fi + + echo "Found xcresult at: $XCRESULT_PATH" + + # Generate coverage reports in different formats + xcrun xccov view --report --json "$XCRESULT_PATH" > coverage-${{ matrix.platform.name }}.json + xcrun xccov view --report "$XCRESULT_PATH" > coverage-${{ matrix.platform.name }}.txt + + # List generated files for debugging + ls -la coverage-* - name: Upload Coverage to Codecov - uses: codecov/codecov-action@v4 + uses: codecov/codecov-action@v5 with: token: ${{ secrets.CODECOV_TOKEN }} - files: ./coverage-${{ matrix.platform.name }}.json - flags: unittests,${{ matrix.platform.name }} + files: ./coverage-${{ matrix.platform.name }}.json,./coverage-${{ matrix.platform.name }}.txt + flags: ${{ matrix.platform.name }} name: codecov-${{ matrix.platform.name }} - fail_ci_if_error: true + fail_ci_if_error: false + verbose: true + override_branch: main + override_commit: ${{ github.sha }} + override_pr: ${{ github.event.number }} # Status Check status-check: diff --git a/README.md b/README.md index 83f2f62..dba1982 100644 --- a/README.md +++ b/README.md @@ -13,6 +13,9 @@ Compatible with all Platforms + + + diff --git a/Tests/Tests.swift b/Tests/Tests.swift index bcc9048..1d3f1b0 100755 --- a/Tests/Tests.swift +++ b/Tests/Tests.swift @@ -77,8 +77,8 @@ class Tests: XCTestCase { func testExample3() { // This is an example of EFQRCodeGenerator test case. let content = "3.1415926535897932384626433832795028841971693993751058209749445923078164062862089986280348253421170679821480865132823066470938446095505822317253594081284811174502841027019385211055596446229489549303819644288109756659334461284756482337867831652712019091456485669234603486104543266482133936072602491412737245870066063155881748815209209628292540917153643678925903600113305305488204665213841469519415116094330572703657595919530921861173819326117931051185480744623799627495673518857527248912279381830119491298336733624406566430860213949463952247371907021798609437027705392171762931767523846748184676694051320005681271452635608277857713427577896091736371787214684409012249534301465495853710507922796892589235420199561121290219608640344181598136297747713099605187072113499999983729780499510597317328160963185950244594553469083026425223082533446850352619311881710100031378387528865875332083814206171776691473035982534904287554687311595628638823537875937519577818577805321712268066130019278766111959092164201989" - let generator = try? EFQRCode.Generator(content, style: .bubble(params: .init())) - let testResult = try? generator?.toImage(width: 1200).cgImage() + let generator = try? EFQRCode.Generator(content, style: .dsj(params: .init())) + let testResult = try? generator?.toImage(width: 800).cgImage() XCTAssertNotNil(testResult, "testResult is nil!") // This is an example of EFQRCodeRecognizer test case. diff --git a/codecov.yml b/codecov.yml index 08aa12b..d5fe3c4 100644 --- a/codecov.yml +++ b/codecov.yml @@ -2,4 +2,7 @@ ignore: - Carthage - Tests - Examples - - Package.swift \ No newline at end of file + - Package.swift + - Package@swift-5.3.swift + - Package@swift-5.9.swift + - .github \ No newline at end of file