Skip to content

Commit 5ba7da5

Browse files
authored
Update destination.yml
1 parent 1366533 commit 5ba7da5

File tree

1 file changed

+26
-6
lines changed

1 file changed

+26
-6
lines changed

.github/workflows/destination.yml

Lines changed: 26 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,45 @@
1-
name: Reproduce Simulator Destination Error
1+
name: Reproduce iOS Simulator Destination Error
22

33
on:
44
workflow_dispatch:
5+
inputs:
6+
simulator_name:
7+
description: "Simulator name (e.g., iPhone 16 Pro)"
8+
required: true
9+
default: "iPhone 16 Pro"
10+
test_plan:
11+
description: "Xcode test plan name"
12+
required: true
13+
default: "UnitTests"
514

615
jobs:
7-
test:
16+
ios:
817
runs-on: macos-14
918

1019
steps:
11-
- name: Set up dummy Xcode project
20+
- name: Checkout Repository
21+
uses: actions/checkout@v4
22+
23+
- name: Print Inputs
24+
run: |
25+
echo "Simulator name: ${{ github.event.inputs.simulator_name }}"
26+
echo "Test Plan: ${{ github.event.inputs.test_plan }}"
27+
28+
- name: List Available Simulators
29+
run: xcrun simctl list devices
30+
31+
- name: Create Dummy Project (to trigger simulator error)
1232
run: |
1333
mkdir DummyApp
1434
cd DummyApp
15-
echo '' > main.swift
1635
swift package init --type executable
1736
swift package generate-xcodeproj
1837
mv DummyApp.xcodeproj Test.xcodeproj
1938
20-
- name: Try running tests on unavailable simulator
39+
- name: Try xcodebuild with invalid simulator
2140
run: |
2241
xcodebuild -project Test.xcodeproj \
2342
-scheme DummyApp \
24-
-destination 'platform=iOS Simulator,name=iPhone 16 Pro,OS=latest' \
43+
-destination "platform=iOS Simulator,name=${{ github.event.inputs.simulator_name }},OS=latest" \
44+
-testPlan ${{ github.event.inputs.test_plan }} \
2545
build-for-testing

0 commit comments

Comments
 (0)