Skip to content

Commit

Permalink
WIP
Browse files Browse the repository at this point in the history
  • Loading branch information
philprime committed Feb 22, 2024
1 parent f8baaae commit 6f6524f
Showing 1 changed file with 21 additions and 22 deletions.
43 changes: 21 additions & 22 deletions .github/workflows/swift.yml
Original file line number Diff line number Diff line change
Expand Up @@ -85,7 +85,6 @@ jobs:
-scheme "Rainbow" \
-sdk iphonesimulator \
-destination "platform=iOS,OS=17.2,name=iPhone 15 Pro" \
-enableCodeCoverage YES \
-derivedDataPath /tmp/DerivedData \
-resultBundlePath test_output \
CODE_SIGNING_ALLOWED="NO" \
Expand All @@ -98,28 +97,28 @@ jobs:
name: test-iOS.log
path: test-iOS.log

- # Generate Coverage Data
name: Generate code coverage reports
run: |
PROFDATA_PATH=$(find /tmp/DerivedData -name "*.profdata")
echo "Detected profdata at path: $PROFDATA_PATH"
xcrun llvm-cov export \
/tmp/DerivedData/Build/Products/Debug-iphonesimulator/RainbowTests.xctest/RainbowTests \
--instr-profile $PROFDATA_PATH \
--format="lcov" > RainbowTests.coverage.lcov
xcrun llvm-cov export \
/tmp/DerivedData/Build/Products/Debug-iphonesimulator/RainbowSwiftUITests.xctest/RainbowSwiftUITests \
--instr-profile $PROFDATA_PATH \
--format="lcov" > RainbowSwiftUITests.coverage.lcov
# - # Generate Coverage Data
# name: Generate code coverage reports
# run: |
# PROFDATA_PATH=$(find /tmp/DerivedData -name "*.profdata")
# echo "Detected profdata at path: $PROFDATA_PATH"
# xcrun llvm-cov export \
# /tmp/DerivedData/Build/Products/Debug-iphonesimulator/RainbowTests.xctest/RainbowTests \
# --instr-profile $PROFDATA_PATH \
# --format="lcov" > RainbowTests.coverage.lcov
# xcrun llvm-cov export \
# /tmp/DerivedData/Build/Products/Debug-iphonesimulator/RainbowSwiftUITests.xctest/RainbowSwiftUITests \
# --instr-profile $PROFDATA_PATH \
# --format="lcov" > RainbowSwiftUITests.coverage.lcov

- # Codecov Coverage
name: Upload coverage to Codecov
uses: codecov/codecov-action@v3.1.1
with:
fail_ci_if_error: true
files: ./RainbowTests.coverage.lcov,./RainbowSwiftUITests.coverage.lcov
flags: iOS
xcode_archive_path: test_output.xcresults
# - # Codecov Coverage
# name: Upload coverage to Codecov
# uses: codecov/codecov-action@v3.1.1
# with:
# fail_ci_if_error: true
# files: ./RainbowTests.coverage.lcov,./RainbowSwiftUITests.coverage.lcov
# flags: iOS
# xcode_archive_path: test_output.xcresults

swiftlint:
runs-on: ubuntu-latest
Expand Down

0 comments on commit 6f6524f

Please sign in to comment.