Commit Graph

95 Commits

Author SHA1 Message Date
Mauro b1ed870474 Support for Xcode 27 on CI (#6217)
* Run the tests on iOS 27.0

Bump the required simulator OS in the preview, UI and Compound tests, and the CI tool's default OS, from 26.5 to 27.0. Test devices stay the same.

iOS 27 writes transcoded videos 146 bytes larger, so update the expected sizes in MediaUploadingPreprocessorTests.

* Build and test on CI with Xcode 27

Select Xcode 27 in ci_common.sh and move every macOS workflow to the xcode-27 runner image, as macos-26 doesn't include Xcode 27. The Compound workflow now also creates its simulator on the iOS 27.0 runtime.

The xcode-27 runners are slower, so give the unit, Enterprise, Compound and snapshot recording jobs longer timeouts.

* Fix the preview snapshot layout on iOS 27

On iOS 27 the hosting controller applies the window's safe area when rendering, but the snapshot size comes from sizeThatFits, which ignores it. Component previews were shifted down and clipped at the bottom. Disable the hosting controller's safe area regions for these snapshots so the measured and rendered layouts match.

swift-snapshot-testing also renders into a window without a scene, and on iOS 27 a navigation stack in such a window reserves space for a large title it never shows, leaving a gap below the navigation bar. Attach the render window to the app's scene until swift-snapshot-testing handles it.

The invite users and add rooms screens sized their selected items row from a measured width stored in state, which is zero on the first layout pass, so snapshots could draw the row empty. Use containerRelativeFrame instead. The add rooms search previews now also wait for their results, and the search previews that show a clear button get a small precision tolerance, as it renders inconsistently in snapshots.

* Re-record the preview snapshots on iOS 27.0

Recorded on an iPhone SE (3rd generation) simulator running iOS 27.0 with Xcode 27.0 (27A266a). The changes come from iOS 27 rendering: text anti-aliasing, hyphenation and line breaking, navigation bars and toggles that now render in snapshots, lazy stacks that were blank on iOS 26, and pseudo-language locale formatting.

* Fix the UI tests on iOS 27

iOS 27 no longer exposes accessibility identifiers on SwiftUI menu items, so the space exploration test now finds them by label within the menu. On iPad, the start chat search field keeps focus after submitting and can swallow the next tap, so retry the tap if the create room screen doesn't appear.

* Re-record the UI test snapshots on iOS 27.0

Recorded on iPhone 17 and iPad (A16) simulators running iOS 27.0 with Xcode 27.0. The changes come from iOS 27 styling, like the keyboard height and glass borders. This also removes the iPad app lock setup snapshots, which have been orphaned since those tests stopped running on iPad.

* Fix the accessibility tests crashing on iOS 27

The accessibility tests' previews wrapper kept its ImageRenderer alive across the awaits that follow the render. On iOS 27, releasing it at that point tears down its view graph outside of a SwiftUI update, which hits an assertion and crashes the app. Release the renderer as soon as the image has been rendered.

* Keep the accessibility tests' image renderers alive on iOS 27

Releasing the ImageRenderer straight away wasn't enough: on iOS 27, releasing one that rendered a preview crashes SwiftUI whichever context it happens in. Keep the renderers alive instead. Each test launches a fresh app, so they only live for the one test.

* Share the UI tests' app settings with their mock user session

Since the user session flow reads its settings from UserSettings, the UI tests' mock user session was wrapping a fresh volatile AppSettings instead of the one the tests configure. The flags that skip onboarding weren't picked up, so every user session UI test got stuck on the notifications permission screen.

* Re-record the Compound snapshots on iOS 27.0

Apply the same safe area fix as the app's preview tests, so size-that-fits snapshots aren't clipped on iOS 27, and re-record the snapshots on an iPhone SE (3rd generation) simulator running iOS 27.0 in English (US).

* Fix a race reading the keyboard in the accessibility tests

On iOS 27 the QR code login screen's keyboard can be dismissing between checking that it exists and reading its frame, which fails the test. Snapshot it in a single query instead.
2026-09-29 17:02:48 +02:00
Stefan Ceriu c8250f6aa4 Tweak the BuildSDK command line tool now that ElementCall also links the SDK 2026-09-23 18:01:39 +03:00
Stefan Ceriu 379a5cd1bc Drop Intel device support from the build scripts and project 2026-09-22 19:56:06 +03:00
Stefan Ceriu 8a3468658b Address PR comments 2026-08-21 12:26:02 +03:00
Stefan Ceriu 0bd571d068 Relaunch the test process on retrying after failures.
So that runner exits continue the retry flows.
2026-08-21 12:26:02 +03:00
Stefan Ceriu cd453bc6fa Move xcresultparser to the Tools to avoid long recompilation times through brew 2026-08-19 07:41:26 +03:00
Stefan Ceriu 771d10ac6b Cache CI test run compilations 2026-08-19 07:41:26 +03:00
Stefan Ceriu e302b37b6a Move Variants into the Components folder
Continue grouping the standalone modules under Components. Updates the
nightly.yml include path and the app icon banner path used by the
configure-nightly CI command.
2026-08-12 16:52:26 +03:00
Stefan Ceriu 5866c4340a Move SDKMocks into the Components folder
Group the standalone modules that live outside of the app targets under a
single Components folder. Updates the XcodeGen include, the Codecov ignore
path and the Sourcery output path used by the generate-sdk-mocks tool.
2026-08-12 16:52:26 +03:00
Stefan Ceriu 1febb3ef91 Retry failed XCUITests 2026-08-11 19:51:33 +03:00
Stefan Ceriu 42a7b6e8ee Annotate failures for Github Actions so they're easier to spot. 2026-08-10 20:33:43 +03:00
Stefan Ceriu 0856fdc146 Improve integration test diagnostics in an attempt to catch run crashes 2026-08-10 13:19:41 +03:00
Mauro 9093631f8b Periphery cleanup (#5893) 2026-07-20 11:16:11 +02:00
Mauro 0be5693779 Constrained tests tool implementation + skill (#5873)
* constrained tests tool implementation + skill

* pr suggestions
2026-07-15 12:17:51 +02:00
Doug 5915713a02 Introduce a build setting to detect Nightly builds. (#5852)
* Allow the AppIconBanner tool to be called with purely the build number.

And use that for the Element Pro Nightly.

* Use a build setting to determine Nightly builds.
2026-07-09 13:56:26 +01:00
Doug 81b33da6ab Switch back to using the stable version of SwiftFormat. (#5850) 2026-07-08 11:01:55 +01:00
Doug 59ba4a238e Fix macros on CI.
The explicit SDK usage means macros fail to compile for macOS. The SDK will be inferred by the destination platform.
Note: We no longer use a plugin so I've remove that argument too.
2026-06-29 10:34:32 +01:00
Mauro ad6ae390d1 use swift 6.2 for dev tools (#5720) 2026-06-09 10:46:29 +02:00
Stefan Ceriu 2fddb597b8 Bump the CI workflows to iOS 26.5, centralise default OS version 2026-06-08 19:54:07 +03:00
Doug fa67713726 Run SwiftFormat. 2026-05-27 17:11:42 +01:00
Doug 5138e05e47 Use SwiftFormat from develop and enabled indent-blank-lines option. 2026-05-27 17:11:42 +01:00
Doug af44833850 Show which test suite failed in the UnitTest logs. 2026-05-04 14:03:28 +03:00
Mauro Romito fa801b5791 splitting runtime sim version from the os version 2026-04-27 14:13:13 +02:00
Mauro Romito 04202676aa use the default preview tests configuration 2026-04-27 14:13:13 +02:00
Mauro Romito 078c249262 use 26.4 os version on SE 3rd gen for preview tests 2026-04-27 14:13:13 +02:00
Mauro a9fae7b4e7 update sim version to 26.4.1 (#5479) 2026-04-24 11:59:15 +02:00
Stefan Ceriu 751ea16b0d Add a snapshot re-recording option to the snapshot tests CI command. 2026-04-20 11:54:44 +03:00
Stefan Ceriu f6fe112789 Split out the preview tests from the unit tests and move them to their own CI tool. 2026-04-20 11:54:44 +03:00
Doug 683c05019e Move the Acknowledgements generation to the post-renovate workflow. (#5438)
* Move the Acknowledgements generation to the post-renovate workflow.

* Use macOS 26.
2026-04-17 14:26:08 +01:00
Doug 63422f8f6b Upgrade the project to use Xcode 26.4 (and the 26.4 simulator for tests). (#5375)
* Upgrade the project to use Xcode 26.4 (and iOS 26.4 when running tests).

* Update the test OS assertions.

* updated preview tests

# Conflicts:
#	PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreenInviteCell.iPhone-en-GB-0.png
#	PreviewTests/Sources/__Snapshots__/PreviewTests/homeScreenInviteCell.iPhone-pseudo-0.png

* update compound preview tests

---------

Co-authored-by: Mauro Romito <mauro.romito@element.io>
2026-04-16 14:33:20 +02:00
Mauro Romito 8b2d83f068 use swift regex and also apply the same logic to stringsdict 2026-04-10 16:21:57 +02:00
Mauro Romito 11dd6f0323 order strings alphabetically by key after downloading them 2026-04-10 16:21:57 +02:00
Doug 8ce6f1f0d3 Really fix the release script. 2026-03-24 19:45:07 +00:00
Doug 86cea87c0f Fix the release script. 2026-03-24 17:06:44 +00:00
Stefan Ceriu c18eb92145 Revert "Move CI GitHub token usage to the global git configuration"
This reverts commit 519cd4052d.
2026-03-19 08:59:30 +02:00
Stefan Ceriu 519cd4052d Move CI GitHub token usage to the global git configuration 2026-03-13 16:57:01 +02:00
Stefan Ceriu bce9119bc3 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
Doug f8039e274b Actually fix the post-build command. 2026-03-05 17:41:24 +00:00
Doug 0d4ff5ea87 Fix the post-build command. 2026-03-05 17:08:54 +00:00
Stefan Ceriu e23959a201 Convert more fastlane tools to swift commands (#5163)
* Upload dSYMs to sentry using swift and the sentry-cli instead of fastlane.

* Replace the fastlane `config_production` lane with a swift tools `ConfigureProduction` command.

* Replace Zsh with CI.run in the new ConfigureNightly command

* Replace the fastlane `tag_nightly` lane with a swift tools `TagNightly` command.

* Print out all the commands going through CI.Run and their arguments

* Address PR comments
2026-03-05 16:14:09 +02:00
Stefan Ceriu 6dd9f3f5e9 Replace the enterprise unit tests workflow with the new swift ones 2026-03-02 12:34:58 +02:00
Stefan Ceriu 1b55fb224c Add swift command for running integration tests 2026-03-02 12:34:58 +02:00
Stefan Ceriu d3cefb8e0b Add swift command for running UI tests 2026-03-02 12:34:58 +02:00
Stefan Ceriu 1d8639a11a Replace the readMarketingVersion method with a cleaner Yams based one and extract it into the shared tools 2026-03-02 12:34:58 +02:00
Stefan Ceriu ef4a78ce53 Add swift command for running accessibility tests 2026-03-02 12:34:58 +02:00
Stefan Ceriu 0fc0e2880b Add a separate tools command for building nightly and remove the old fastlane one. 2026-02-26 18:43:49 +02:00
Stefan Ceriu 737b907d26 Set CI RunTests command retries default to 0, use 3 only for running unit tests. 2026-02-26 16:32:39 +02:00
Stefan Ceriu fc03e05697 Replace ruby/fastlane tools with swift variants. (#5105)
* Replace ruby/fastlane unit and preview test flows with swift variants.

* Switch to swift-log and Logger for logging

* Address (my own!) PR comments.

---------

Co-authored-by: Doug <douglase@element.io>
2026-02-19 09:13:42 +00:00
Stefan Ceriu 23062901c0 Update files following swiftformat upgrade 2026-01-27 12:50:57 +02:00
Doug a53b9137ef Add a dedicated target for SDK mocks to avoid type name conflicts on the generated code. 2026-01-06 10:57:37 +00:00