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
15 changes: 15 additions & 0 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -14,6 +14,21 @@ concurrency:
cancel-in-progress: true

jobs:
ios-runner-swift-compat:
name: iOS Runner Swift Compatibility
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- name: Checkout
uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2

- name: Disallow trailing commas before closing parenthesis in Swift
run: |
if rg -nU --glob '*.swift' ',\s*\n\s*\)' ios-runner; then
echo "Found trailing commas before ')' in Swift files. This syntax requires Swift 6.1+ and breaks older Xcode toolchains."
exit 1
fi

unit:
name: Unit Tests
runs-on: ubuntu-latest
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -310,7 +310,7 @@ extension RunnerTests {
compact: command.compact ?? false,
depth: command.depth,
scope: command.scope,
raw: command.raw ?? false,
raw: command.raw ?? false
)
if options.raw {
needsPostSnapshotInteractionDelay = true
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -68,14 +68,14 @@ extension RunnerTests {
let outputSettings: [String: Any] = [
AVVideoCodecKey: AVVideoCodecType.h264,
AVVideoWidthKey: Int(dimensions.width),
AVVideoHeightKey: Int(dimensions.height),
AVVideoHeightKey: Int(dimensions.height)
]
let input = AVAssetWriterInput(mediaType: .video, outputSettings: outputSettings)
input.expectsMediaDataInRealTime = true
let attributes: [String: Any] = [
kCVPixelBufferPixelFormatTypeKey as String: kCVPixelFormatType_32ARGB,
kCVPixelBufferWidthKey as String: Int(dimensions.width),
kCVPixelBufferHeightKey as String: Int(dimensions.height),
kCVPixelBufferHeightKey as String: Int(dimensions.height)
]
let adaptor = AVAssetWriterInputPixelBufferAdaptor(
assetWriterInput: input,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -82,11 +82,11 @@ extension RunnerTests {
x: Double(rootSnapshot.frame.origin.x),
y: Double(rootSnapshot.frame.origin.y),
width: Double(rootSnapshot.frame.size.width),
height: Double(rootSnapshot.frame.size.height),
height: Double(rootSnapshot.frame.size.height)
),
enabled: rootSnapshot.isEnabled,
hittable: rootHittable,
depth: 0,
depth: 0
)
)

Expand Down Expand Up @@ -149,11 +149,11 @@ extension RunnerTests {
x: Double(snapshot.frame.origin.x),
y: Double(snapshot.frame.origin.y),
width: Double(snapshot.frame.size.width),
height: Double(snapshot.frame.size.height),
height: Double(snapshot.frame.size.height)
),
enabled: snapshot.isEnabled,
hittable: hittable,
depth: min(maxDepth, visibleDepth),
depth: min(maxDepth, visibleDepth)
)
)

Expand Down Expand Up @@ -216,7 +216,7 @@ extension RunnerTests {
rect: snapshotRect(from: snapshot.frame),
enabled: snapshot.isEnabled,
hittable: hittable,
depth: depth,
depth: depth
)
)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -19,7 +19,7 @@ extension RunnerTests {
if buffer.count + data.count > self.maxRequestBytes {
let response = self.jsonResponse(
status: 413,
response: Response(ok: false, error: ErrorPayload(message: "request too large")),
response: Response(ok: false, error: ErrorPayload(message: "request too large"))
)
connection.send(content: response, completion: .contentProcessed { [weak self] _ in
connection.cancel()
Expand Down Expand Up @@ -111,7 +111,7 @@ extension RunnerTests {
"Content-Length: \(body.utf8.count)",
"Connection: close",
"",
body,
body
].joined(separator: "\r\n")
return Data(headers.utf8)
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -59,7 +59,7 @@ final class RunnerTests: XCTestCase {
.tabBar,
.textField,
.secureTextField,
.textView,
.textView
]
// Keep blocker actions narrow to avoid false positives from generic hittable containers.
let actionableTypes: Set<XCUIElement.ElementType> = [
Expand All @@ -68,7 +68,7 @@ final class RunnerTests: XCTestCase {
.link,
.menuItem,
.checkBox,
.switch,
.switch
]

// MARK: - XCTest Entry
Expand Down
Loading