Skip to content

Fix INFOPLIST_FILE paths in ios/RIBs.xcodeproj after the move #44

Fix INFOPLIST_FILE paths in ios/RIBs.xcodeproj after the move

Fix INFOPLIST_FILE paths in ios/RIBs.xcodeproj after the move #44

Workflow file for this run

name: CI iOS
on: [push, pull_request]
permissions:
contents: read
jobs:
build-and-test:
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
- name: Set up Ruby
uses: ruby/setup-ruby@v1
with:
ruby-version: '3.1'
- name: Install CocoaPods
run: gem install cocoapods
- name: Install pod dependencies
working-directory: ./Example
run: pod install || pod install --repo-update
- name: Run tests with coverage
working-directory: ./Example
run: |
# Resolve an available iPhone simulator at runtime instead of pinning a
# model name, which rots whenever the macos-latest runner image updates.
DEVICE_ID=$(xcrun simctl list devices available --json \
| jq -r '[.devices[][] | select(.name | test("iPhone"))] | first | .udid')
echo "Using simulator: $DEVICE_ID"
xcodebuild \
-workspace RIBs.xcworkspace \
-scheme RIBs-Example \
-sdk iphonesimulator \
-destination "platform=iOS Simulator,id=$DEVICE_ID" \
-enableCodeCoverage YES \
clean test
- name: Extract and print coverage
run: |
RESULT_BUNDLE=$(find ~/Library/Developer/Xcode/DerivedData -type d -name "*.xcresult" | sort | tail -n 1)
echo "Found result bundle at: $RESULT_BUNDLE"
xcrun xccov view --report --json "$RESULT_BUNDLE" > coverage.json
cat coverage.json
xcrun xccov view --report "$RESULT_BUNDLE"
- name: Lint podspec
run: |
pod lib lint RIBs.podspec \
--skip-tests
spm-test:
name: SPM build & test
runs-on: macos-latest
steps:
- name: Checkout code
uses: actions/checkout@v3
# The repo root resolves directly to Package.swift — the Carthage
# xcodeproj now lives under ios/ so it no longer shadows the package.
- name: Build & test Swift package on simulator
run: |
# Resolve an available iPhone simulator at runtime instead of pinning a
# model name, which rots whenever the macos-latest runner image updates.
DEVICE_ID=$(xcrun simctl list devices available --json \
| jq -r '[.devices[][] | select(.name | test("iPhone"))] | first | .udid')
echo "Using simulator: $DEVICE_ID"
xcodebuild test \
-scheme RIBs \
-destination "platform=iOS Simulator,id=$DEVICE_ID"