Skip to content

chore(deps): update dependency cocoapods to v1.16.2 #427

chore(deps): update dependency cocoapods to v1.16.2

chore(deps): update dependency cocoapods to v1.16.2 #427

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:
unit-tests:
name: Unit Tests (${{ matrix.build.sdk }})
runs-on: macos-14
timeout-minutes: 30
strategy:
matrix:
build: [
{ sdk: 'iphonesimulator', destination: 'platform=iOS Simulator,OS=17.5,name=iPhone 15 Pro', action: 'test' },
{ sdk: 'xros', destination: 'platform=visionOS Simulator,OS=1.2,name=Apple Vision Pro', action: 'build' }
]
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Check environment
run: |
xcodebuild -version
swift --version
- name: Run Tests
run: |
set -o pipefail && \
env NSUnbufferedIO=YES \
xcodebuild -workspace . \
-scheme "TPPDF" \
-sdk "${{ matrix.build.sdk }}" \
-destination "${{ matrix.build.destination }}" \
-configuration Debug \
${{ matrix.build.action == 'test' && '-enableCodeCoverage YES' || '' }} \
-derivedDataPath /tmp/DerivedData \
-resultBundlePath test_output \
CODE_SIGNING_ALLOWED="NO" \
${{ matrix.build.action }} 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
if: matrix.build.action == 'test'
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: Unit Tests (macos)
runs-on: macos-14
timeout-minutes: 30
steps:
- name: Checkout the repository
uses: actions/checkout@v4
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
- name: Check environment
run: |
xcodebuild -version
swift --version
- 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