mirror of
https://github.com/Novaloop-AG/element-x-ios.git
synced 2026-11-05 20:09:04 +00:00
Bump the CI workflows to iOS 26.5, centralise default OS version
This commit is contained in:
@@ -21,7 +21,7 @@ struct PreviewTests {
|
|||||||
|
|
||||||
private let deviceConfig: ViewImageConfig = .iPhoneX
|
private let deviceConfig: ViewImageConfig = .iPhoneX
|
||||||
private let simulatorDevice: String? = "iPhone14,6" // iPhone SE 3rd Generation
|
private let simulatorDevice: String? = "iPhone14,6" // iPhone SE 3rd Generation
|
||||||
private let requiredOSVersion = (major: 26, minor: 4)
|
private let requiredOSVersion = (major: 26, minor: 5)
|
||||||
/// The key is the name we will give to the snapshot
|
/// The key is the name we will give to the snapshot
|
||||||
/// The value is the actual device that will be used to render the preview
|
/// The value is the actual device that will be used to render the preview
|
||||||
private let snapshotDevices: [SnapshotDevice] = [.init(name: "iPhone", device: "iPhone 17"),
|
private let snapshotDevices: [SnapshotDevice] = [.init(name: "iPhone", device: "iPhone 17"),
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ struct AccessibilityTests: AsyncParsableCommand {
|
|||||||
var device = "iPhone 17"
|
var device = "iPhone 17"
|
||||||
|
|
||||||
@Option(help: "iOS version for the simulator.")
|
@Option(help: "iOS version for the simulator.")
|
||||||
var osVersion = "26.4.1"
|
var osVersion = CI.defaultOSVersion
|
||||||
|
|
||||||
func run() async throws {
|
func run() async throws {
|
||||||
var testsFailed = false
|
var testsFailed = false
|
||||||
|
|||||||
@@ -19,6 +19,7 @@ struct CI: ParsableCommand {
|
|||||||
ReleaseToGitHub.self
|
ReleaseToGitHub.self
|
||||||
])
|
])
|
||||||
|
|
||||||
|
static let defaultOSVersion = "26.5"
|
||||||
static let testOutputDirectory = "test_output"
|
static let testOutputDirectory = "test_output"
|
||||||
|
|
||||||
/// Reads the `MARKETING_VERSION` from `project.yml`.
|
/// Reads the `MARKETING_VERSION` from `project.yml`.
|
||||||
|
|||||||
@@ -13,7 +13,7 @@ struct IntegrationTests: AsyncParsableCommand {
|
|||||||
var device = "iPhone 17"
|
var device = "iPhone 17"
|
||||||
|
|
||||||
@Option(help: "iOS version for the simulator.")
|
@Option(help: "iOS version for the simulator.")
|
||||||
var osVersion = "26.4.1"
|
var osVersion = CI.defaultOSVersion
|
||||||
|
|
||||||
func run() async throws {
|
func run() async throws {
|
||||||
// Delete old log files
|
// Delete old log files
|
||||||
|
|||||||
@@ -10,7 +10,7 @@ struct PreviewTests: AsyncParsableCommand {
|
|||||||
|
|
||||||
private static let scheme = "PreviewTests"
|
private static let scheme = "PreviewTests"
|
||||||
private static let device = "iPhone SE (3rd generation)"
|
private static let device = "iPhone SE (3rd generation)"
|
||||||
private static let osVersion = "26.4.1"
|
private static let osVersion = CI.defaultOSVersion
|
||||||
private static let simulatorType = "com.apple.CoreSimulator.SimDeviceType.iPhone-SE-3rd-generation"
|
private static let simulatorType = "com.apple.CoreSimulator.SimDeviceType.iPhone-SE-3rd-generation"
|
||||||
private static let testPlanPath = "PreviewTests/SupportingFiles/PreviewTests.xctestplan"
|
private static let testPlanPath = "PreviewTests/SupportingFiles/PreviewTests.xctestplan"
|
||||||
|
|
||||||
|
|||||||
@@ -9,7 +9,7 @@ struct RunTests: AsyncParsableCommand {
|
|||||||
|
|
||||||
Examples:
|
Examples:
|
||||||
swift run tools run-tests --scheme UnitTests
|
swift run tools run-tests --scheme UnitTests
|
||||||
swift run tools run-tests --scheme UITests --device iPhone --os-version 26.4
|
swift run tools run-tests --scheme UITests --device iPhone --os-version 26.5
|
||||||
swift run tools run-tests --scheme PreviewTests --create-simulator-name "iPhone SE (3rd generation)" \
|
swift run tools run-tests --scheme PreviewTests --create-simulator-name "iPhone SE (3rd generation)" \
|
||||||
--create-simulator-type com.apple.CoreSimulator.SimDeviceType.iPhone-SE-3rd-generation
|
--create-simulator-type com.apple.CoreSimulator.SimDeviceType.iPhone-SE-3rd-generation
|
||||||
""")
|
""")
|
||||||
@@ -20,8 +20,8 @@ struct RunTests: AsyncParsableCommand {
|
|||||||
@Option(help: "The simulator device name to run tests on (e.g. 'iPhone 17').")
|
@Option(help: "The simulator device name to run tests on (e.g. 'iPhone 17').")
|
||||||
var device = "iPhone 17"
|
var device = "iPhone 17"
|
||||||
|
|
||||||
@Option(help: "The iOS version to use for the simulator runtime (e.g. '26.4').")
|
@Option(help: "The iOS version to use for the simulator runtime (e.g. '26.5').")
|
||||||
var osVersion = "26.4.1"
|
var osVersion = CI.defaultOSVersion
|
||||||
|
|
||||||
var runtime: String {
|
var runtime: String {
|
||||||
osVersion.split(separator: ".").prefix(2).joined(separator: ".")
|
osVersion.split(separator: ".").prefix(2).joined(separator: ".")
|
||||||
|
|||||||
@@ -20,7 +20,7 @@ struct UITests: AsyncParsableCommand {
|
|||||||
var deviceType: DeviceType
|
var deviceType: DeviceType
|
||||||
|
|
||||||
@Option(help: "iOS version for the simulator.")
|
@Option(help: "iOS version for the simulator.")
|
||||||
var osVersion = "26.4.1"
|
var osVersion = CI.defaultOSVersion
|
||||||
|
|
||||||
@Option(help: "Run only a specific test (format: 'ClassName/testName').")
|
@Option(help: "Run only a specific test (format: 'ClassName/testName').")
|
||||||
var testName: String?
|
var testName: String?
|
||||||
|
|||||||
@@ -8,7 +8,7 @@ struct UnitTests: AsyncParsableCommand {
|
|||||||
@Flag(help: "Skip preview tests")
|
@Flag(help: "Skip preview tests")
|
||||||
var skipPreviews = false
|
var skipPreviews = false
|
||||||
|
|
||||||
private static let osVersion = "26.4.1"
|
private static let osVersion = CI.defaultOSVersion
|
||||||
private static let device = "iPhone 17"
|
private static let device = "iPhone 17"
|
||||||
|
|
||||||
func run() async throws {
|
func run() async throws {
|
||||||
|
|||||||
@@ -35,7 +35,7 @@ enum Application {
|
|||||||
private static func checkEnvironments() {
|
private static func checkEnvironments() {
|
||||||
let requirediPhoneSimulator = "iPhone18,3" // iPhone 17
|
let requirediPhoneSimulator = "iPhone18,3" // iPhone 17
|
||||||
let requirediPadSimulator = "iPad15,7" // iPad (A16)
|
let requirediPadSimulator = "iPad15,7" // iPad (A16)
|
||||||
let requiredOSVersion = (major: 26, minor: 4)
|
let requiredOSVersion = (major: 26, minor: 5)
|
||||||
|
|
||||||
let osVersion = ProcessInfo().operatingSystemVersion
|
let osVersion = ProcessInfo().operatingSystemVersion
|
||||||
guard osVersion.majorVersion == requiredOSVersion.major, osVersion.minorVersion == requiredOSVersion.minor else {
|
guard osVersion.majorVersion == requiredOSVersion.major, osVersion.minorVersion == requiredOSVersion.minor else {
|
||||||
|
|||||||
@@ -39,7 +39,7 @@ setup_github_actions_translations_environment() {
|
|||||||
|
|
||||||
xcode_select_for_github_actions() {
|
xcode_select_for_github_actions() {
|
||||||
# We need to select it globally for other processes like xcresultparser and our custom tools to use the same Xcode version.
|
# We need to select it globally for other processes like xcresultparser and our custom tools to use the same Xcode version.
|
||||||
sudo xcode-select -s /Applications/Xcode_26.4.app
|
sudo xcode-select -s /Applications/Xcode_26.5.0.app
|
||||||
}
|
}
|
||||||
|
|
||||||
generate_what_to_test_notes() {
|
generate_what_to_test_notes() {
|
||||||
|
|||||||
Reference in New Issue
Block a user