Skip to content

fix: added edge-case handling for images with zero available height #308

fix: added edge-case handling for images with zero available height

fix: added edge-case handling for images with zero available height #308

Workflow file for this run

name: Tests
on:
push:
pull_request:
branches:
- main
workflow_dispatch:
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
ios-unit-tests:
name: iOS Unit Tests
runs-on: macos-14
timeout-minutes: 30
steps:
- # Checkout the repository
uses: actions/checkout@v4
- # Run Tests
name: Run Tests iOS
run: |
set -o pipefail && \
env NSUnbufferedIO=YES \
xcodebuild -workspace . \
-scheme "TPPDF" \
-sdk iphonesimulator \
-destination "OS=17.4,name=iPhone 15 Pro" \
-configuration Debug \
-enableCodeCoverage YES \
-derivedDataPath /tmp/DerivedData \
-resultBundlePath test_output \
CODE_SIGNING_ALLOWED="NO" \
test 2>&1 | tee test.log | xcbeautify
- name: Upload test log file on error
uses: actions/upload-artifact@v4
if: failure()
with:
name: test.log
path: test.log
- 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/TPPDFTests.xctest/TPPDFTests \
--instr-profile $PROFDATA_PATH \
--format="lcov" > unit-tests.coverage.lcov
xcrun llvm-cov export \
/tmp/DerivedData/Build/Products/Debug-iphonesimulator/TPPDFIntegrationTests.xctest/TPPDFIntegrationTests \
--instr-profile $PROFDATA_PATH \
--format="lcov" > integration-tests.coverage.lcov
macos-unit-tests:
name: macOS Unit Tests
runs-on: macos-14
timeout-minutes: 30
steps:
- # Checkout the repository
uses: actions/checkout@v4
- # Run Tests
name: Run tests
run: swift test --parallel --enable-code-coverage
- name: Generate code coverage reports
run: |
xcrun llvm-cov export \
.build/debug/TPPDFPackageTests.xctest/Contents/MacOS/TPPDFPackageTests \
--instr-profile .build/debug/codecov/default.profdata \
--format="lcov" > coverage.lcov