Files
letro-ios/Tools/Sources/Commands/CI/AccessibilityTests.swift
Stefan Ceriu c3ba6113fe Replace the last of the fastlane lanes with swift tooling
- move more sharable code to CI static methods
- merge `release_to_github` and `prepare_next_release` into one single command as they had dependencies on each other
- remove all traces of ruby and fastlane
2026-03-11 10:06:44 +02:00

40 lines
1.3 KiB
Swift

import ArgumentParser
import Foundation
struct AccessibilityTests: AsyncParsableCommand {
static let configuration = CommandConfiguration(commandName: "accessibility-tests",
abstract: "Runs the accessibility test CI workflow.")
@Option(help: "Device name for tests.")
var device = "iPhone 17"
@Option(help: "iOS version for the simulator.")
var osVersion = "26.1"
func run() async throws {
var testsFailed = false
do {
logger.info("\n🧪 Running accessibility tests…\n")
try await RunTests.parse([
"--scheme", "AccessibilityTests",
"--device", device,
"--os-version", osVersion,
"--retries", "0"
]).run()
} catch {
testsFailed = true
logger.error("\n❌ Accessibility tests failed.\n")
}
// Zip results (best-effort, useful for CI artifact uploads)
await CI.zipResults(bundles: ["AccessibilityTests.xcresult"],
outputName: "AccessibilityTests.xcresult.zip")
if testsFailed {
throw ExitCode.failure
}
logger.info("\n✅ Accessibility tests passed.\n")
}
}