feat: Local tiles #21
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: iOS Build and Test | |
on: | |
push: | |
pull_request: | |
jobs: | |
build: | |
runs-on: macos-latest | |
steps: | |
- name: Checkout repository | |
uses: actions/checkout@v4 | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: 18 | |
cache: 'yarn' | |
- name: Install Yarn | |
run: npm install -g yarn | |
- name: Install dependencies | |
run: yarn install | |
- name: Build iOS app | |
run: | | |
yarn expo prebuild --platform ios --clean | |
cd ios | |
pod install | |
cd .. | |
yarn generate-test-data | |
cd ios | |
# Debug: Show current directory | |
pwd | |
echo "Contents of current directory:" | |
ls -la | |
SDK_VERSION=$(xcodebuild -showsdks | grep 'Simulator - iOS' | grep -o 'iphonesimulator[0-9.]*' | head -1) | |
OS_VERSION=$(echo $SDK_VERSION | grep -o '[0-9.]*') | |
# Add -derivedDataPath flag to specify build output location | |
xcodebuild -workspace pinpadclientmaplibre.xcworkspace \ | |
-scheme pinpadclientmaplibre \ | |
-configuration Debug \ | |
-sdk $SDK_VERSION \ | |
-destination "platform=iOS Simulator,OS=$OS_VERSION,name=iPhone 15" \ | |
-derivedDataPath build \ | |
build | |
# Debug: Show build directory contents | |
echo "Contents of build directory:" | |
ls -R build/ | |
- name: Start Expo and run tests | |
timeout-minutes: 10 | |
run: | | |
# Boot simulator | |
xcrun simctl boot 'iPhone 15' | |
# Debug: Show current directory and build location | |
pwd | |
echo "Looking for build artifacts:" | |
ls -R ios/build/ | |
# Install the app (updated path based on derivedDataPath) | |
xcrun simctl install 'iPhone 15' "ios/build/Build/Products/Debug-iphonesimulator/pinpadclientmaplibre.app" | |
# Start Expo in the background | |
yarn expo start & | |
# Wait for Metro to be ready | |
sleep 15 | |
# Run Maestro tests | |
yarn test:maestro:ios | |
env: | |
CI: true |