Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
135 changes: 135 additions & 0 deletions .github/workflows/dining-ui.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,135 @@
name: iOS Dining UI

on:
pull_request:
branches: [develop]
paths:
- '.github/workflows/dining-ui.yml'
- '.maestro/dining.yaml'
- 'Koin/Presentation/Dining/**'
- 'Koin/Presentation/Home/Home/SubViews/DiningView/**'

permissions:
contents: read

concurrency:
group: dining-ui-${{ github.event.pull_request.number }}
cancel-in-progress: true

jobs:
dining:
if: github.event.pull_request.head.repo.full_name == github.repository
runs-on: macos-26
timeout-minutes: 45
steps:
- uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
with:
persist-credentials: false

- name: Prepare Stage configuration
env:
DEBUG_XCCONFIG: ${{ secrets.DEBUG_XCCONFIG }}
GOOGLE_SERVICE_STAGE_PLIST: ${{ secrets.GOOGLE_SERVICE_STAGE_PLIST }}
run: |
test -n "$DEBUG_XCCONFIG"
test -n "$GOOGLE_SERVICE_STAGE_PLIST"
mkdir -p Koin/Core/Configuration
printf '%s' "$DEBUG_XCCONFIG" | base64 --decode > Koin/Core/Configuration/Debug.xcconfig
printf '%s' "$GOOGLE_SERVICE_STAGE_PLIST" | base64 --decode > GoogleService-Info-Stage.plist

- uses: actions/cache@55cc8345863c7cc4c66a329aec7e433d2d1c52a9 # v6.1.0
with:
path: SourcePackages
key: spm-${{ hashFiles('koin.xcodeproj/project.xcworkspace/xcshareddata/swiftpm/Package.resolved') }}

- name: Build and install Stage on iPhone Simulator
run: |
sudo xcode-select -s /Applications/Xcode_26.4.1.app
device=$(xcrun simctl list devices available -j | jq -er '[.devices | to_entries | sort_by(.key) | reverse | .[].value[] | select(.name == "iPhone 17 Pro") | .udid][0]')
xcrun simctl bootstatus "$device" -b
xcodebuild build -project koin.xcodeproj -scheme koin-stage \
-configuration Debug -destination "platform=iOS Simulator,id=$device" \
-derivedDataPath build/dining-ui -clonedSourcePackagesDirPath SourcePackages \
CODE_SIGN_IDENTITY=- CODE_SIGNING_REQUIRED=YES
for app in build/dining-ui/Build/Products/Debug-iphonesimulator/*.app; do
bundle=$(/usr/libexec/PlistBuddy -c 'Print CFBundleIdentifier' "$app/Info.plist")
if [[ "$bundle" == com.bcsdlab.koin.stage ]]; then
plutil -lint "$app/GoogleService-Info.plist"
# Xcode embeds simulator App Groups from the simulated entitlement payload,
# not the host-side ad hoc signature inspected by codesign -d.
simulated=build/dining-ui/Build/Intermediates.noindex/koin.build/Debug-iphonesimulator/koin.build/koin.app-Simulated.xcent
/usr/libexec/PlistBuddy -c 'Print :com.apple.security.application-groups:0' \
"$simulated" | grep -Fxq 'group.com.bcsdlab.koin'
executable=$(/usr/libexec/PlistBuddy -c 'Print CFBundleExecutable' "$app/Info.plist")
xcrun simctl install "$device" "$app"
printf 'DINING_DEVICE=%s\n' "$device" >> "$GITHUB_ENV"
printf 'DINING_EXECUTABLE=%s\n' "$executable" >> "$GITHUB_ENV"
exit 0
fi
done
echo 'Stage simulator app not found' >&2
exit 1

- name: Verify guest dining entry and meal change
env:
MAESTRO_VERSION: '2.2.0'
run: |
export JAVA_HOME=$(/usr/libexec/java_home -v 17)
curl -fsSL https://get.maestro.mobile.dev | bash
mkdir -p build/dining-ui/evidence
cd build/dining-ui/evidence
"$HOME/.maestro/bin/maestro" --device "$DINING_DEVICE" test ../../../.maestro/dining.yaml \
--format junit --output junit.xml --test-output-dir .

- name: Diagnose Stage launch after a UI failure
if: ${{ failure() && env.DINING_DEVICE != '' }}
run: |
mkdir -p build/dining-ui/evidence
out=build/dining-ui/evidence
xcrun simctl terminate "$DINING_DEVICE" com.bcsdlab.koin.stage || true
xcrun simctl launch "$DINING_DEVICE" com.bcsdlab.koin.stage > "$out/launch.txt" 2>&1 || true
for attempt in {1..12}; do
if find "$HOME/Library/Logs/DiagnosticReports" -maxdepth 1 -name "$DINING_EXECUTABLE-*.ips" -print -quit | grep -q .; then
break
fi
sleep 5
done
xcrun simctl io "$DINING_DEVICE" screenshot "$out/standalone-launch.png" || true
python3 - <<'PY' | tee "$out/crash-summary.txt"
import json
import os
from pathlib import Path

executable = os.environ["DINING_EXECUTABLE"]
report_dir = Path.home() / "Library/Logs/DiagnosticReports"
for report in sorted(report_dir.glob(f"{executable}-*.ips")):
try:
_, body = report.read_text().split("\n", 1)
data = json.loads(body)
except (OSError, ValueError):
continue
exception = data.get("exception", {})
termination = data.get("termination", {})
print(report.name, exception.get("type"), exception.get("signal"),
termination.get("namespace"), termination.get("code"))
threads = data.get("threads", [])
if not threads:
print("No threads recorded in report")
thread = next((t for t in threads if t.get("triggered")), None)
index = data.get("faultingThread")
if thread is None and isinstance(index, int) and 0 <= index < len(threads):
thread = threads[index]
images = data.get("usedImages", [])
for frame in (thread or {}).get("frames", [])[:20]:
index = frame.get("imageIndex")
image = images[index] if isinstance(index, int) and 0 <= index < len(images) else {}
print(image.get("name"), frame.get("symbol"), frame.get("imageOffset"))
PY

- name: Upload dining UI evidence
if: always()
uses: actions/upload-artifact@v4
with:
name: ios-dining-ui
path: build/dining-ui/evidence/
retention-days: 7
32 changes: 32 additions & 0 deletions .maestro/dining.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,32 @@
appId: com.bcsdlab.koin.stage
name: Guest dining entry and meal content change
---
- launchApp:
clearState: true
permissions:
all: allow
- extendedWaitUntil:
visible: '닫기|오늘의 식단'
timeout: 60000
- tapOn:
text: '닫기'
optional: true
- tapOn:
id: home-dining-view-all
- extendedWaitUntil:
visible: '아침'
timeout: 30000
- tapOn: '아침'
- extendedWaitUntil:
visible:
id: dining-menu-0
timeout: 30000
- takeScreenshot: dining-breakfast
- tapOn: '저녁'
- extendedWaitUntil:
visible:
id: dining-menu-2
timeout: 30000
- assertNotVisible:
id: dining-menu-0
- takeScreenshot: dining-dinner
Original file line number Diff line number Diff line change
Expand Up @@ -80,6 +80,7 @@ struct DiningMenuListView: View {
.padding(.vertical, 20)
}
.scrollIndicators(.hidden)
.accessibilityIdentifier("dining-menu-\(list.diningType.index)")
.background{
if list.items.isEmpty {
DiningEmptyView()
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,6 +30,7 @@ struct DiningHeaderButton: View {
.foregroundStyle(Color.ColorSystem.Neutral.gray600)
}
.buttonStyle(.plain)
.accessibilityIdentifier("home-dining-view-all")
}
.padding(.horizontal, 24)
.frame(maxWidth: .infinity)
Expand Down
6 changes: 6 additions & 0 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -165,6 +165,12 @@ Koin
└── Frameworks # 외부 프레임워크
```

### 식단 UI 검증

같은 저장소의 식단 관련 PR에서는 `iOS Dining UI`가 iPhone 17 Pro 시뮬레이터에서 Stage 앱을 검증합니다.
비로그인 상태로 식단에 진입해 아침에서 저녁으로 전환한 뒤, 저녁 목록이 나타나고 이전 목록이 사라지는지 확인합니다.
스크린샷과 JUnit 결과는 Actions의 `ios-dining-ui` 산출물에서 확인할 수 있습니다.

---

### 🧑‍🧑‍🧒‍🧒 Team Members
Expand Down
Loading