From 78b437a73150ba2f98117714f69a1129c6ab65e4 Mon Sep 17 00:00:00 2001 From: Alex Moisei Date: Fri, 13 Mar 2026 11:34:28 +0100 Subject: [PATCH 1/8] Fixed unittest workflow --- .github/workflows/unittests.yml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index f2af5a5..c0c611b 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -6,15 +6,15 @@ on: jobs: build: name: Unit Tests - runs-on: macOS-latest + runs-on: macos-15 if: github.event.pull_request.draft == false env: LC_ALL: en_US.UTF-8 LANG: en_US.UTF-8 - DEVELOPER_DIR: '/Applications/Xcode_15.4.app/Contents/Developer' + DEVELOPER_DIR: '/Applications/Xcode_16.4.app/Contents/Developer' steps: - name: Checkout - uses: actions/checkout@v2 + uses: actions/checkout@v4 with: fetch-depth: 100 From aace24f13e71f6a30eb21a2782ea2461116520f6 Mon Sep 17 00:00:00 2001 From: Alex Moisei Date: Fri, 13 Mar 2026 11:40:35 +0100 Subject: [PATCH 2/8] Disable code signing in CI test builds Xcode 16 enforces stricter code signing validation, causing CI to fail with "No signing certificate Mac Development found" even for simulator test builds. Override signing settings via xcargs in Fastlane scan calls. Co-Authored-By: Claude Opus 4.6 --- fastlane/Fastfile | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index b293b7e..f596c59 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -3,9 +3,11 @@ ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "10" lane :unittest do scan( - scheme: "SectionKit" + scheme: "SectionKit", + xcargs: "CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO" ) scan( - scheme: "DiffingSectionKit" + scheme: "DiffingSectionKit", + xcargs: "CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO" ) end From 4a09adeda9862f23826e2a9a53dae07178777073 Mon Sep 17 00:00:00 2001 From: Alex Moisei Date: Fri, 13 Mar 2026 11:47:15 +0100 Subject: [PATCH 3/8] Change codeowners to atom-mobile-platform-ios --- .github/CODEOWNERS | 4 +--- 1 file changed, 1 insertion(+), 3 deletions(-) diff --git a/.github/CODEOWNERS b/.github/CODEOWNERS index 06f5b03..36b64a3 100644 --- a/.github/CODEOWNERS +++ b/.github/CODEOWNERS @@ -1,3 +1 @@ -# Auto-generated on 2025-08-13 from topics: element-lifecycle -# Full-repo ownership: -* @traderepublic/element-lifecycle +* @traderepublic/atom-mobile-platform-ios From 9cd486ee4a045b6749d9ca1598b052284bd4ac2f Mon Sep 17 00:00:00 2001 From: Alex Moisei Date: Fri, 13 Mar 2026 11:52:20 +0100 Subject: [PATCH 4/8] Fixed UICollectionViewApplyTests --- .../Tests/TestUtilities/MockCollectionView.swift | 8 ++++++++ .../Tests/Utility/UICollectionViewApplyTests.swift | 12 ++++-------- 2 files changed, 12 insertions(+), 8 deletions(-) diff --git a/SectionKit/Tests/TestUtilities/MockCollectionView.swift b/SectionKit/Tests/TestUtilities/MockCollectionView.swift index fcf3784..9b20f6c 100644 --- a/SectionKit/Tests/TestUtilities/MockCollectionView.swift +++ b/SectionKit/Tests/TestUtilities/MockCollectionView.swift @@ -3,6 +3,14 @@ import UIKit import XCTest internal final class MockCollectionView: UICollectionView { + // MARK: - window + + internal var _window: UIWindow? + + override var window: UIWindow? { + _window ?? super.window + } + // MARK: - reloadData internal typealias ReloadDataBlock = () -> Void diff --git a/SectionKit/Tests/Utility/UICollectionViewApplyTests.swift b/SectionKit/Tests/Utility/UICollectionViewApplyTests.swift index 1e75842..e41b57f 100644 --- a/SectionKit/Tests/Utility/UICollectionViewApplyTests.swift +++ b/SectionKit/Tests/Utility/UICollectionViewApplyTests.swift @@ -128,8 +128,7 @@ final class UICollectionViewApplyTests: XCTestCase { reloadSectionsExpectation.fulfill() } - let window = UIWindow() - window.addSubview(collectionView) + collectionView._window = UIWindow() let update = CollectionViewSectionUpdate( controller: BaseSectionController(), @@ -226,8 +225,7 @@ final class UICollectionViewApplyTests: XCTestCase { reloadItemsExpectation.fulfill() } - let window = UIWindow() - window.addSubview(collectionView) + collectionView._window = UIWindow() let update = CollectionViewSectionUpdate( controller: BaseSectionController(), @@ -379,8 +377,7 @@ final class UICollectionViewApplyTests: XCTestCase { } collectionView._reloadData = reloadDataExpectation.fulfill - let window = UIWindow() - window.addSubview(collectionView) + collectionView._window = UIWindow() let update = CollectionViewUpdate( batchOperations: [ @@ -451,8 +448,7 @@ final class UICollectionViewApplyTests: XCTestCase { reloadSectionsExpectation.fulfill() } - let window = UIWindow() - window.addSubview(collectionView) + collectionView._window = UIWindow() let update = CollectionViewUpdate( batchOperations: [ From 4c685173cd60bf108f4479e6b2e4f740d1c5674c Mon Sep 17 00:00:00 2001 From: Alex Moisei Date: Fri, 13 Mar 2026 12:15:13 +0100 Subject: [PATCH 5/8] SUPPORTS_MACCATALYST=NO --- fastlane/Fastfile | 2 ++ 1 file changed, 2 insertions(+) diff --git a/fastlane/Fastfile b/fastlane/Fastfile index f596c59..0603569 100644 --- a/fastlane/Fastfile +++ b/fastlane/Fastfile @@ -4,10 +4,12 @@ ENV["FASTLANE_XCODEBUILD_SETTINGS_TIMEOUT"] = "10" lane :unittest do scan( scheme: "SectionKit", + device: "iPhone 16", xcargs: "CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO" ) scan( scheme: "DiffingSectionKit", + device: "iPhone 16", xcargs: "CODE_SIGN_IDENTITY='' CODE_SIGNING_REQUIRED=NO CODE_SIGNING_ALLOWED=NO" ) end From 65b1f6e9bf921a72641318b66de6c9fbd80e5dcf Mon Sep 17 00:00:00 2001 From: Alex Moisei Date: Thu, 2 Apr 2026 12:05:45 +0200 Subject: [PATCH 6/8] Refresh PR state for merge approval From dce3d56d1a6277f155cc4af31921a5b1dc0efb48 Mon Sep 17 00:00:00 2001 From: Alex Moisei Date: Thu, 2 Apr 2026 12:45:24 +0200 Subject: [PATCH 7/8] Add SonarCloud scan to CI workflow - Add SonarCloud scan step after unit tests in unittests.yml - Add sonar-project.properties with project key traderepublic_SectionKit --- .github/workflows/unittests.yml | 12 ++++++++++++ sonar-project.properties | 22 ++++++++++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 sonar-project.properties diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index c0c611b..1040726 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -33,3 +33,15 @@ jobs: - name: Build and run unit tests run: bundle exec fastlane unittest + + - name: SonarCloud Scan + uses: SonarSource/sonarqube-scan-action@v6.0.0 + with: + args: >- + ${{ github.event_name == 'merge_group' && format('-Dsonar.pullrequest.branch={0} -Dsonar.pullrequest.key={1}', github.ref, github.run_number) || '' }} + ${{ github.event_name == 'pull_request' && format('-D sonar.scm.revision={0}', github.event.pull_request.head.sha) || '' }} + ${{ github.event_name == 'pull_request' && format('-D sonar.pullrequest.key={0}', github.event.pull_request.number) || '' }} + ${{ github.event_name == 'pull_request' && format('-D sonar.pullrequest.branch={0}', github.head_ref) || '' }} + env: + SONAR_TOKEN: ${{ secrets.ORG_SONAR_COMMUNITY_TOKEN }} + SONAR_HOST_URL: ${{ vars.SONAR_COMMUNITY_URL }} diff --git a/sonar-project.properties b/sonar-project.properties new file mode 100644 index 0000000..557767a --- /dev/null +++ b/sonar-project.properties @@ -0,0 +1,22 @@ +sonar.organization=traderepublic +sonar.projectKey=traderepublic_SectionKit +sonar.projectName=SectionKit + +# Disable C/C++/ObjC (requires build wrapper) +sonar.c.file.suffixes=- +sonar.cpp.file.suffixes=- +sonar.objc.file.suffixes=- + +sonar.scm.provider=git +sonar.sourceEncoding=UTF-8 + +sonar.sources=. +sonar.exclusions=\ + Carthage/**,\ + DerivedData/**,\ + fastlane/**,\ + vendor/**,\ + *.xcodeproj/** + +sonar.tests=. +sonar.test.inclusions=**/*Tests.swift From d0bcaec9dcc6a9fe68fb18f06601806deab7d7c5 Mon Sep 17 00:00:00 2001 From: Alex Moisei Date: Thu, 2 Apr 2026 17:03:22 +0200 Subject: [PATCH 8/8] Remove SonarCloud scan step - SonarQube requirement removed at org level --- .github/workflows/unittests.yml | 12 ------------ sonar-project.properties | 22 ---------------------- 2 files changed, 34 deletions(-) delete mode 100644 sonar-project.properties diff --git a/.github/workflows/unittests.yml b/.github/workflows/unittests.yml index 1040726..c0c611b 100644 --- a/.github/workflows/unittests.yml +++ b/.github/workflows/unittests.yml @@ -33,15 +33,3 @@ jobs: - name: Build and run unit tests run: bundle exec fastlane unittest - - - name: SonarCloud Scan - uses: SonarSource/sonarqube-scan-action@v6.0.0 - with: - args: >- - ${{ github.event_name == 'merge_group' && format('-Dsonar.pullrequest.branch={0} -Dsonar.pullrequest.key={1}', github.ref, github.run_number) || '' }} - ${{ github.event_name == 'pull_request' && format('-D sonar.scm.revision={0}', github.event.pull_request.head.sha) || '' }} - ${{ github.event_name == 'pull_request' && format('-D sonar.pullrequest.key={0}', github.event.pull_request.number) || '' }} - ${{ github.event_name == 'pull_request' && format('-D sonar.pullrequest.branch={0}', github.head_ref) || '' }} - env: - SONAR_TOKEN: ${{ secrets.ORG_SONAR_COMMUNITY_TOKEN }} - SONAR_HOST_URL: ${{ vars.SONAR_COMMUNITY_URL }} diff --git a/sonar-project.properties b/sonar-project.properties deleted file mode 100644 index 557767a..0000000 --- a/sonar-project.properties +++ /dev/null @@ -1,22 +0,0 @@ -sonar.organization=traderepublic -sonar.projectKey=traderepublic_SectionKit -sonar.projectName=SectionKit - -# Disable C/C++/ObjC (requires build wrapper) -sonar.c.file.suffixes=- -sonar.cpp.file.suffixes=- -sonar.objc.file.suffixes=- - -sonar.scm.provider=git -sonar.sourceEncoding=UTF-8 - -sonar.sources=. -sonar.exclusions=\ - Carthage/**,\ - DerivedData/**,\ - fastlane/**,\ - vendor/**,\ - *.xcodeproj/** - -sonar.tests=. -sonar.test.inclusions=**/*Tests.swift