Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitd82ccd7

Browse files
committed
chore: fix ci jobs
1 parentfa8160e commitd82ccd7

File tree

8 files changed

+1140
-42
lines changed

8 files changed

+1140
-42
lines changed
Lines changed: 87 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,87 @@
1+
name:Create IOS Development App
2+
description:Create IOS Development App
3+
4+
runs:
5+
using:composite
6+
steps:
7+
-name:Cache iOS development build
8+
id:ios-dev-cache
9+
uses:actions/cache@v4
10+
with:
11+
path:|
12+
example/ios/build/DerivedData
13+
key:ios-dev-${{ runner.os }}-${{ hashFiles('example/ios/**', 'example/package.json', 'package.json') }}
14+
restore-keys:|
15+
ios-dev-${{ runner.os }}-
16+
17+
-name:Check for cached build
18+
shell:bash
19+
run:|
20+
if [ "${{ steps.ios-dev-cache.outputs.cache-hit }}" == "true" ]; then
21+
echo "✅ Cache hit! Using cached build."
22+
23+
# Verify cached build exists
24+
if [ -d "example/ios/build/DerivedData/Build/Products/Release-iphonesimulator" ]; then
25+
echo "Cached build directory exists, exiting early."
26+
exit 0
27+
else
28+
echo "⚠️ Cache hit but no build found, continuing with build..."
29+
fi
30+
fi
31+
32+
-name:Build package
33+
shell:bash
34+
run:yarn build
35+
36+
-name:Generate ios folder
37+
shell:bash
38+
run:yarn example expo prebuild --platform ios
39+
40+
-name:Install xcpretty
41+
shell:bash
42+
run:gem install xcpretty
43+
44+
-name:Build iOS development app
45+
id:build
46+
working-directory:example
47+
shell:bash
48+
run:|
49+
set -o pipefail
50+
51+
# Build the native iOS app using xcodebuild
52+
echo "🔨 Starting iOS build..."
53+
cd ios
54+
xcodebuild -workspace example.xcworkspace \
55+
-scheme example \
56+
-configuration Release \
57+
-sdk iphonesimulator \
58+
-derivedDataPath build/DerivedData \
59+
CODE_SIGNING_ALLOWED=NO \
60+
build | xcpretty
61+
62+
cd ..
63+
64+
echo "✅ Build completed"
65+
66+
# Find the built .app bundle
67+
APP_PATH=$(find ios/build/DerivedData/Build/Products/Release-iphonesimulator -name "*.app" -type d | head -n 1)
68+
if [ -z "$APP_PATH" ]; then
69+
echo "❌ No .app bundle found after build"
70+
echo "📁 Contents of Release-iphonesimulator directory:"
71+
ls -la ios/build/DerivedData/Build/Products/Release-iphonesimulator/ || echo "Directory doesn't exist"
72+
exit 1
73+
fi
74+
75+
echo "✅ Built app at: $APP_PATH"
76+
echo "app-path=$APP_PATH" >> $GITHUB_OUTPUT
77+
78+
# Create a tar for better caching (go back to example directory)
79+
tar -czf ios-dev-build.tar.gz -C "$(dirname "$APP_PATH")" "$(basename "$APP_PATH")"
80+
81+
-name:Upload development build
82+
if:steps.ios-dev-cache.outputs.cache-hit != 'true'
83+
uses:actions/upload-artifact@v4
84+
with:
85+
name:ios-dev-build
86+
path:example/ios-dev-build.tar.gz
87+
retention-days:1

‎.github/actions/maestro/action.yml‎

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,41 @@
1+
name:Maestro
2+
description:Setup Maestro
3+
4+
runs:
5+
using:composite
6+
steps:
7+
-name:Install dependencies and Maestro
8+
run:|
9+
export MAESTRO_VERSION=1.41.0
10+
curl -Ls “https://get.maestro.mobile.dev" | bash
11+
arch -arm64 brew tap facebook/fb
12+
arch -arm64 brew install facebook/fb/idb-companion
13+
arch -arm64 brew install jq
14+
15+
-name:Set up JDK 11
16+
uses:actions/setup-java@v2
17+
with:
18+
java-version:‘11’
19+
distribution:‘adopt’
20+
21+
-name:Start iOS Simulator
22+
run:|
23+
# Find a simulator by name (e.g., iPhone 15)
24+
DEVICE_ID=$(xcrun simctl list devices available --json | jq -r '.devices[] | .[] | select(.name == "iPhone 16") | .udid' | head -n 1)
25+
DEVICE_STATE=$(xcrun simctl list devices available --json | jq -r --arg DEVICE_ID "$DEVICE_ID" '.devices[] | .[] | select(.udid == $DEVICE_ID) | .state')
26+
27+
if [ -z "$DEVICE_ID" ]; then
28+
echo "No available simulator found for the criteria."
29+
exit 1
30+
fi
31+
32+
echo "DEVICE_ID=$DEVICE_ID" >> $GITHUB_ENV
33+
34+
if [ "$DEVICE_STATE" != "Booted" ]; then
35+
# Boot the simulator if it's not already booted
36+
xcrun simctl boot "$DEVICE_ID"
37+
# Wait a bit for the simulator to boot
38+
sleep 30
39+
else
40+
echo "Simulator with DEVICE_ID=$DEVICE_ID is already booted."
41+
fi

‎.github/workflows/ci.yml‎

Lines changed: 60 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -14,7 +14,6 @@ jobs:
1414
steps:
1515
-name:Checkout Repository
1616
uses:actions/checkout@v4
17-
1817
lint:
1918
runs-on:ubuntu-latest
2019
steps:
@@ -75,3 +74,63 @@ jobs:
7574
7675
-name:Check for unstaged files
7776
uses:./.github/actions/check-unstaged-files
77+
78+
build-ios-dev:
79+
runs-on:macos-15
80+
steps:
81+
-name:Checkout Repository
82+
uses:actions/checkout@v4
83+
84+
-name:Setup
85+
uses:./.github/actions/setup
86+
87+
-name:Build iOS app
88+
id:build
89+
uses:./.github/actions/ios-dev-app
90+
91+
# maestro-ios:
92+
# runs-on: macos-latest
93+
# needs: build-ios-dev
94+
# steps:
95+
# - name: Checkout
96+
# uses: actions/checkout@v4
97+
98+
# - name: Setup Maestro
99+
# uses: ./.github/actions/maestro
100+
101+
# - name: Download development build
102+
# uses: actions/download-artifact@v4
103+
# with:
104+
# name: ios-dev-build
105+
# path: ./
106+
107+
# - name: Extract and install app
108+
# run: |
109+
# # Extract the app bundle
110+
# tar -xzf ios-dev-build.tar.gz
111+
# APP_PATH=$(find . -name "*.app" -type d | head -n 1)
112+
113+
# if [ -z "$APP_PATH" ]; then
114+
# echo "No .app bundle found after extraction"
115+
# exit 1
116+
# fi
117+
118+
# echo "Installing app from: $APP_PATH"
119+
# xcrun simctl install $DEVICE_ID "$APP_PATH"
120+
121+
# # Get the app bundle ID for launching
122+
# APP_BUNDLE_ID=$(plutil -extract CFBundleIdentifier raw "$APP_PATH/Info.plist")
123+
# echo "APP_BUNDLE_ID=$APP_BUNDLE_ID" >> $GITHUB_ENV
124+
125+
# - name: Run Maestro tests
126+
# run: |
127+
# # Ensure the simulator is booted before running tests
128+
# if [ -z "$DEVICE_ID" ]; then
129+
# echo "No simulator found. Exiting."
130+
# exit 1
131+
# fi
132+
133+
# # Launch the app first
134+
# xcrun simctl launch $DEVICE_ID $APP_BUNDLE_ID
135+
136+
# maestro test --device-id "$DEVICE_ID" --test-dir src/__tests__/e2e --report-dir src/__tests__/e2e/reports

‎.github/workflows/prettier.yml‎

Lines changed: 0 additions & 33 deletions
This file was deleted.

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp