-
Notifications
You must be signed in to change notification settings - Fork 0
79 lines (63 loc) · 2.18 KB
/
ios-build.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
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