Skip to content

Commit 0ba9b6c

Browse files
authored
Workflows uses Xcode 15 (#316)
* Workflows uses Xcode 15 * Run workflows when workflow changes * Fixes UI tests * Makes destination more specific * Updates DEVELOPER_DIR * Update build_and_test.yml * Uses iPhone 14
1 parent 9277498 commit 0ba9b6c

File tree

9 files changed

+30
-54
lines changed

9 files changed

+30
-54
lines changed

.github/workflows/build_and_test.yml

Lines changed: 10 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ on:
44
pull_request:
55
branches: [ main ]
66
paths:
7+
- '.github/workflows/build_and_test.yml'
78
- 'Sources/**'
89
- '!Sources/Runestone/Documentation.docc/**'
910
- 'Tests/**'
1011
concurrency:
1112
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1213
cancel-in-progress: true
1314
env:
14-
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
15+
DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer
1516
jobs:
1617
build:
1718
name: Build and test on iPhone 14
@@ -23,10 +24,13 @@ jobs:
2324
submodules: recursive
2425
- name: Build
2526
run: |
26-
xcodebuild build-for-testing -scheme Runestone -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14'
27+
xcodebuild build-for-testing\
28+
-scheme Runestone\
29+
-sdk iphonesimulator\
30+
-destination "platform=iOS Simulator,name=iPhone 14 Pro,OS=17.0"
2731
- name: Test
28-
env:
29-
scheme: ${{ 'default' }}
30-
platform: ${{ 'iOS Simulator' }}
3132
run: |
32-
xcodebuild test-without-building -scheme Runestone -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14'
33+
xcodebuild test-without-building\
34+
-scheme Runestone\
35+
-sdk iphonesimulator\
36+
-destination "platform=iOS Simulator,name=iPhone 14 Pro,OS=17.0"

.github/workflows/build_example_project.yml

Lines changed: 7 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -4,12 +4,13 @@ on:
44
pull_request:
55
branches: [ main ]
66
paths:
7+
- '.github/workflows/build_example_project.yml'
78
- 'Example/**'
89
concurrency:
910
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1011
cancel-in-progress: true
1112
env:
12-
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
13+
DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer
1314
jobs:
1415
build:
1516
name: Build example project for iPhone 14
@@ -21,4 +22,8 @@ jobs:
2122
submodules: recursive
2223
- name: Build
2324
run: |
24-
xcodebuild build -project Example/Example.xcodeproj -scheme Example -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14'
25+
xcodebuild build\
26+
-project Example/Example.xcodeproj\
27+
-scheme Example\
28+
-sdk iphonesimulator\
29+
-destination "platform=iOS Simulator,name=iPhone 14 Pro,OS=17.0"

.github/workflows/codeql.yml

Lines changed: 6 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ concurrency:
88
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
99
cancel-in-progress: true
1010
env:
11-
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
11+
DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer
1212
jobs:
1313
analyze:
1414
name: Analyze
@@ -29,7 +29,11 @@ jobs:
2929
with:
3030
languages: ${{ matrix.language }}
3131
- name: Build
32-
run: xcodebuild -scheme Runestone -sdk iphonesimulator -destination 'platform=iOS Simulator,name=iPhone 14'
32+
run: |
33+
xcodebuild\
34+
-scheme Runestone\
35+
-sdk iphonesimulator\
36+
-destination "platform=iOS Simulator,name=iPhone 14 Pro,OS=17.0"
3337
- name: Perform CodeQL Analysis
3438
uses: github/codeql-action/analyze@v2
3539
with:

.github/workflows/deploy_documentation.yml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,7 @@ concurrency:
99
group: "pages"
1010
cancel-in-progress: true
1111
env:
12-
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
12+
DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer
1313
jobs:
1414
build:
1515
runs-on: macos-13

.github/workflows/ui_tests.yml

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,14 +4,15 @@ on:
44
pull_request:
55
branches: [ main ]
66
paths:
7+
- '.github/workflows/ui_tests.yml'
78
- 'Sources/**'
89
- '!Sources/Runestone/Documentation.docc/**'
910
- 'UITests/HostUITests/**'
1011
concurrency:
1112
group: ${{ github.workflow }}-${{ github.event.pull_request.number || github.ref }}
1213
cancel-in-progress: true
1314
env:
14-
DEVELOPER_DIR: /Applications/Xcode_14.3.1.app/Contents/Developer
15+
DEVELOPER_DIR: /Applications/Xcode_15.0.app/Contents/Developer
1516
jobs:
1617
run_korean_tests:
1718
name: Run Korean tests
@@ -28,7 +29,7 @@ jobs:
2829
- name: Disable "Use the Same Keyboard Language as macOS"
2930
run: defaults write com.apple.iphonesimulator EnableKeyboardSync -bool NO
3031
- name: Create Simulator
31-
run: xcrun simctl create "${SIMULATOR_NAME}" "iPhone 8"
32+
run: xcrun simctl create "${SIMULATOR_NAME}" "iPhone 13" "iOS15.5"
3233
- name: Find Simulator UDID
3334
run: |
3435
TMP_SIMULATOR_UDID=`xcrun simctl list --json devices | jq -r ".devices | flatten | .[] | select(.name == \"${SIMULATOR_NAME}\").udid"`
@@ -92,7 +93,7 @@ jobs:
9293
- name: Disable "Use the Same Keyboard Language as macOS"
9394
run: defaults write com.apple.iphonesimulator EnableKeyboardSync -bool NO
9495
- name: Create Simulator
95-
run: xcrun simctl create "${SIMULATOR_NAME}" "iPhone 8"
96+
run: xcrun simctl create "${SIMULATOR_NAME}" "iPhone 13" "iOS15.5"
9697
- name: Find Simulator UDID
9798
run: |
9899
TMP_SIMULATOR_UDID=`xcrun simctl list --json devices | jq -r ".devices | flatten | .[] | select(.name == \"${SIMULATOR_NAME}\").udid"`

Scripts/run-ui-test-chinese.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PROJECT_PATH="${SCRIPT_PATH}/../UITests/UITests.xcodeproj"
66
# Disable "Use the Same Keyboard Language as macOS" in Simulator.app.
77
defaults write com.apple.iphonesimulator EnableKeyboardSync -bool NO
88
# Create the simulator we will use for the tests.
9-
xcrun simctl create "${SIMULATOR_NAME}" "iPhone 8" 2> /dev/null
9+
xcrun simctl create "${SIMULATOR_NAME}" "iPhone 13" "iOS15.5" 2> /dev/null
1010
# Find the UDID of the newly created simulator.
1111
SIMULATOR_UDID=`xcrun simctl list --json devices | jq -r ".devices | flatten | .[] | select(.name == \"${SIMULATOR_NAME}\").udid"`
1212
# Edit the simulator's .GlobalPreferences.plist to use the Chinese language.

Scripts/run-ui-test-korean.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,7 @@ PROJECT_PATH="${SCRIPT_PATH}/../UITests/UITests.xcodeproj"
66
# Disable "Use the Same Keyboard Language as macOS" in Simulator.app.
77
defaults write com.apple.iphonesimulator EnableKeyboardSync -bool NO
88
# Create the simulator we will use for the tests.
9-
xcrun simctl create "${SIMULATOR_NAME}" "iPhone 8" 2> /dev/null
9+
xcrun simctl create "${SIMULATOR_NAME}" "iPhone 13" "iOS15.5" 2> /dev/null
1010
# Find the UDID of the newly created simulator.
1111
SIMULATOR_UDID=`xcrun simctl list --json devices | jq -r ".devices | flatten | .[] | select(.name == \"${SIMULATOR_NAME}\").udid"`
1212
# Edit the simulator's .GlobalPreferences.plist to use the Korean language.

UITests/HostUITests/KoreanInputTests.swift

Lines changed: 0 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -95,37 +95,6 @@ final class KoreanInputTests: XCTestCase {
9595
XCTAssertEqual(app.textView?.value as? String, "\"\"")
9696
}
9797

98-
func testInsertingKoreanCharactersBelowStringContainingKoreanLetters() throws {
99-
let app = XCUIApplication().disablingTextPersistance()
100-
app.launch()
101-
app.textView?.tap()
102-
app.keys[""].tap()
103-
app.keys[""].tap()
104-
app.keys[""].tap()
105-
app.keys[""].tap()
106-
app.keys[""].tap()
107-
app.keys[""].tap()
108-
app.buttons["Return"].tap()
109-
app.keys["more"].tap()
110-
app.keys["\""].tap()
111-
app.keys["more"].tap()
112-
app.keys[""].tap()
113-
app.keys[""].tap()
114-
app.keys[""].tap()
115-
app.keys[""].tap()
116-
app.keys[""].tap()
117-
app.keys[""].tap()
118-
app.tap(at: CGPoint(x: 100, y: 100))
119-
app.buttons["Return"].tap()
120-
app.keys[""].tap()
121-
app.keys[""].tap()
122-
app.keys[""].tap()
123-
app.keys[""].tap()
124-
app.keys[""].tap()
125-
app.keys[""].tap()
126-
XCTAssertEqual(app.textView?.value as? String, "어어어\n\"어어어\"\n어어어")
127-
}
128-
12998
func testInsertingKoreanCharactersInTextWithCRLFLineEndings() throws {
13099
let app = XCUIApplication().disablingTextPersistance().usingCRLFLineEndings()
131100
app.launch()

UITests/HostUITests/XCUIApplication+Helpers.swift

Lines changed: 0 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -10,13 +10,6 @@ extension XCUIApplication {
1010
scrollViews.children(matching: .textView).element
1111
}
1212

13-
func tap(at point: CGPoint) {
14-
let normalized = coordinate(withNormalizedOffset: .zero)
15-
let offset = CGVector(dx: point.x, dy: point.y)
16-
let coordinate = normalized.withOffset(offset)
17-
coordinate.tap()
18-
}
19-
2013
func disablingTextPersistance() -> Self {
2114
var newLaunchEnvironment = launchEnvironment
2215
newLaunchEnvironment[EnvironmentKey.disableTextPersistance] = "1"

0 commit comments

Comments
 (0)