Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Fix broken CI workflows (v4) #1948

Merged
merged 59 commits into from
Jan 21, 2025
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
59 commits
Select commit Hold shift + click to select a range
9b9935f
Update workflows machine version
nauaros Jan 15, 2025
db18e01
Update device destinations
nauaros Jan 15, 2025
54fd011
Update device destination in PR Scan job
nauaros Jan 15, 2025
4ab7e61
Update device destination in PR Scan job
nauaros Jan 15, 2025
10003f1
Update device destination in PR Scan job
nauaros Jan 15, 2025
6a96fc6
Update Xcode version
nauaros Jan 15, 2025
00acaa2
Update Xcode version
nauaros Jan 15, 2025
6e5149d
Try macos-13 on SPM job
nauaros Jan 15, 2025
1bbc156
Update CI
nauaros Jan 15, 2025
509992a
Update CI
nauaros Jan 15, 2025
d7b677f
Update CI
nauaros Jan 15, 2025
efa7c42
Update CI
nauaros Jan 15, 2025
db632e5
Update CI
nauaros Jan 15, 2025
6637eb7
Update CI
nauaros Jan 15, 2025
5171927
Update CI
nauaros Jan 15, 2025
c6e893a
Update CI
nauaros Jan 15, 2025
9746d5e
Update CI
nauaros Jan 15, 2025
2dc6bff
Update CI
nauaros Jan 15, 2025
a077f09
Update CI
nauaros Jan 15, 2025
14e5fd6
Update CI
nauaros Jan 15, 2025
bb467f9
Update CI
nauaros Jan 16, 2025
7c73fea
Update CI
nauaros Jan 16, 2025
be5daaa
Update CI
nauaros Jan 16, 2025
a41f8c9
Update CI
nauaros Jan 16, 2025
3a20ea3
Update CI
nauaros Jan 16, 2025
262a28c
Update unit tests
nauaros Jan 16, 2025
c636fe7
Update CI
nauaros Jan 17, 2025
71e7d1b
switching to Void? for AssociatedKeys (#1950)
goergisn Jan 17, 2025
8d986c0
Update CI
nauaros Jan 17, 2025
4124a1e
Update CI
nauaros Jan 17, 2025
107d3c3
Merge remote-tracking branch 'refs/remotes/origin/update-ci-machine-v…
nauaros Jan 17, 2025
293dbfa
Update CI
nauaros Jan 17, 2025
5cd4648
Update CI
nauaros Jan 20, 2025
b6eb803
Update encoder output formatting
nauaros Jan 20, 2025
22db5eb
Add encodeWithSortedKeys to JSONEncoder
nauaros Jan 20, 2025
c3b3ae7
Update JSONWebEncryptionGenerator to use sorted keys encoding
nauaros Jan 20, 2025
efe3a40
Fix testEncryptBIN test
nauaros Jan 20, 2025
7a0d9f3
Fix testKCP test
nauaros Jan 20, 2025
c0b9acf
Install swiftlint
nauaros Jan 20, 2025
1f86973
Update sonar phase
nauaros Jan 20, 2025
2be3381
Remove Java version configuration
nauaros Jan 20, 2025
f50cf4a
Update PR scan job
nauaros Jan 20, 2025
e2033f4
Update PR scan job
nauaros Jan 20, 2025
af9975a
Create base environment
nauaros Jan 20, 2025
508de6c
Update PR Scan workflow
nauaros Jan 20, 2025
8d9c263
Update PR Scan workflow
nauaros Jan 20, 2025
9ee3a2d
Update PR Scan workflow
nauaros Jan 20, 2025
014c59b
Update CoderTests
nauaros Jan 20, 2025
51ab54f
Update PR Scan workflow
nauaros Jan 20, 2025
6ae6f79
Update PR Scan workflow
nauaros Jan 20, 2025
ea58ccd
Update PR Scan workflow
nauaros Jan 20, 2025
862bffe
Update PR Scan workflow
nauaros Jan 20, 2025
939c292
Update PR Scan workflow
nauaros Jan 20, 2025
60f6ae0
Update PR Scan workflow
nauaros Jan 21, 2025
caf5ecf
Update PR Scan workflow
nauaros Jan 21, 2025
bdb309f
Update PR Scan workflow
nauaros Jan 21, 2025
fafc0d0
Update PR Scan workflow
nauaros Jan 21, 2025
4bc54e4
Update ThreeDS2ClassicActionHandlerTests
nauaros Jan 21, 2025
fa30798
Update runners
nauaros Jan 21, 2025
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
40 changes: 28 additions & 12 deletions .github/workflows/build.yml
Original file line number Diff line number Diff line change
Expand Up @@ -10,20 +10,36 @@ on:
jobs:

tests:
runs-on: macos-12
runs-on: macos-14-xlarge
continue-on-error: true
strategy:
fail-fast: false
matrix:
include:
- destination: 'name=iPhone 11 Pro'
scheme: AdyenUIHost
- destination: 'name=iPhone-6,OS=11.4'
scheme: AdyenUIHost
- destination: 'name=iPhone-X,OS=12.4'
scheme: AdyenUIKitTests
- destination: 'name=iPhone 8,OS=13.7'
scheme: AdyenUIHost

- version: '18.1'
runtime: 'iOS-18-1'
device: 'iPhone 16'
displayname: 'iPhone-16'
os: 'macos-14-xlarge'
xcode_version: '16.1'
needs_custom_sim: false # Takes the shipped simulator that comes with Xcode 16

- version: '18.1'
runtime: 'iOS-18-1'
device: 'iPad (10th generation)'
displayname: 'iPad-10th-generation'
os: 'macos-14-xlarge'
xcode_version: '16.1'
needs_custom_sim: false # Takes the shipped simulator that comes with Xcode 16

- version: '16.4'
runtime: 'iOS-16-4'
device: 'iPhone 14'
displayname: 'iPhone-14'
os: 'macos-14-xlarge'
xcode_version: '16.1'
needs_custom_sim: false # Takes the shipped simulator that comes with Xcode 16
steps:
- uses: actions/checkout@v3
- uses: n1hility/cancel-previous-runs@v3
Expand Down Expand Up @@ -65,12 +81,12 @@ jobs:
destination: ${{ matrix.destination }}

sonar:
runs-on: macos-12
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v2
- uses: actions/setup-java@v1
with:
java-version: '11'
java-version: '17'

- name: Install Dependencies
run: |
Expand All @@ -84,7 +100,7 @@ jobs:
project: 'Adyen.xcodeproj'
params: '-derivedDataPath ./DerivedData -enableCodeCoverage YES'
scheme: AdyenUIHost
destination: 'name=iPhone 11'
destination: 'name=iPhone 16'

- name: Slather
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/format_project.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [workflow_dispatch]
jobs:

Update:
runs-on: macos-12
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v4
with:
Expand All @@ -15,7 +15,7 @@ jobs:
- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.1'

- name: Format project
run: |
Expand Down
17 changes: 9 additions & 8 deletions .github/workflows/pr_scan.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,14 @@ on:
types: [opened, synchronize, reopened]

jobs:

build:
env:
sonarToken: ${{ secrets.SONAR_TOKEN }}
runs-on: macos-12
destination: "name=iPhone 16 Pro,OS=18.1"
project: "Adyen.xcodeproj"
params: "-derivedDataPath ./DerivedData -skipPackagePluginValidation"
runs-on: macos-14-xlarge

steps:
- uses: actions/checkout@v3
Expand All @@ -18,12 +21,12 @@ jobs:
token: ${{ secrets.GITHUB_TOKEN }}
- uses: actions/setup-java@v1
with:
java-version: '11'
java-version: '17'

- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.1'

- name: Install Tools
run: |
Expand All @@ -43,11 +46,8 @@ jobs:
xcodebuild -version
xcodebuild clean build test -project "${project}" -scheme "${scheme}" ${params} -destination "${destination}" | xcpretty && exit ${PIPESTATUS[0]}
env:
project: 'Adyen.xcodeproj'
params: '-derivedDataPath ./DerivedData -enableCodeCoverage YES'
params: '${{env.params}}'
scheme: 'AdyenUIHost'
destination: 'name=iPhone 11'

- name: Slather
run: |
slather coverage --sonarqube-xml ${params} ${project}
Expand All @@ -68,6 +68,7 @@ jobs:

- name: SwiftLint
run: |
brew install swiftlint
fastlane run swiftlint output_file:"./reports/swiftlint.json" reporter:"json" ignore_exit_status:"true"

- name: Run Sonar
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publich_podspec.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,14 +3,14 @@ on: [workflow_dispatch]
jobs:

publish:
runs-on: macos-12
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v3

- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.1'

- name: Publish Adyen.podspec
run: |
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/publish-demo-app.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [workflow_dispatch]
jobs:

Publish:
runs-on: macos-12
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -15,7 +15,7 @@ jobs:
- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.1'

- name: Install the Apple certificate and provisioning profile
env:
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/regenerate-docs.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@ on: [workflow_dispatch]
jobs:

Generate:
runs-on: macos-12
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -15,7 +15,7 @@ jobs:
- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.1'

- name: Generate Docs
run: |
Expand Down
2 changes: 1 addition & 1 deletion .github/workflows/spell-check.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:

setup:
runs-on: macos-12
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v3
- uses: n1hility/cancel-previous-runs@v3
Expand Down
4 changes: 2 additions & 2 deletions .github/workflows/test-SPM-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ on:
jobs:

SPM:
runs-on: macos-12
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v3
- uses: n1hility/cancel-previous-runs@v3
Expand All @@ -22,7 +22,7 @@ jobs:
- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.1'

- name: Test Swift Package Manager Integration
run: |
Expand Down
9 changes: 5 additions & 4 deletions .github/workflows/test-carthage-integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,27 +12,28 @@ on:
jobs:

carthage:
runs-on: macos-12
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: n1hility/cancel-previous-runs@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.1'

- name: Resolve dependencies
run: |
brew update
brew install xcodegen
brew install carthage
brew upgrade carthage

- name: Test Carthage Integration
env:
GITHUB_ACCESS_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run: |
carthage version
Scripts/test-carthage-integration.sh
Scripts/test-carthage-integration.sh
11 changes: 7 additions & 4 deletions .github/workflows/test_cocoapods_integration.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,24 +12,27 @@ on:
jobs:

pods:
runs-on: macos-12
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v3
- uses: actions/checkout@v4
- uses: n1hility/cancel-previous-runs@v3
with:
token: ${{ secrets.GITHUB_TOKEN }}

- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.1'

- name: Lint Cocoapods
run: |
brew update
brew install xcodegen
gem install cocoapods -v 1.10.2
pod repo update
pod lib lint Adyen.podspec --allow-warnings --verbose

- name: Test Cocoapods Integration
run: |
Scripts/test-CocoaPods-integration.sh -w
Scripts/test-CocoaPods-integration.sh
Scripts/test-CocoaPods-integration.sh
4 changes: 2 additions & 2 deletions .github/workflows/update-version.yml
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@ on:
jobs:

Update:
runs-on: macos-12
runs-on: macos-14-xlarge
steps:
- uses: actions/checkout@v3
with:
Expand All @@ -20,7 +20,7 @@ jobs:
- name: Select latest Xcode
uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: latest-stable
xcode-version: '16.1'

- name: Update version number
run: |
Expand Down
4 changes: 4 additions & 0 deletions Adyen.xcodeproj/project.pbxproj
Original file line number Diff line number Diff line change
Expand Up @@ -124,6 +124,7 @@
C978F5EF2732CD6A00F59B3C /* FormCardSecurityCodeItemViewTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C978F5EE2732CD6A00F59B3C /* FormCardSecurityCodeItemViewTests.swift */; };
C982FFD826946F0800AED849 /* AffirmComponent.swift in Sources */ = {isa = PBXBuildFile; fileRef = C982FFD726946F0800AED849 /* AffirmComponent.swift */; };
C982FFDC2694792F00AED849 /* AffirmPaymentMethod.swift in Sources */ = {isa = PBXBuildFile; fileRef = C982FFDB2694792F00AED849 /* AffirmPaymentMethod.swift */; };
C9B506C32D3E776200AAE686 /* JSONEncoder+SortedKeys.swift.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9B506C22D3E776200AAE686 /* JSONEncoder+SortedKeys.swift.swift */; };
C9BB460427622D9B00E6730B /* BACSConfirmationViewProtocolMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9BB460327622D9B00E6730B /* BACSConfirmationViewProtocolMock.swift */; };
C9BB460627622E9600E6730B /* BACSConfirmationPresenterProtocolMock.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9BB460527622E9600E6730B /* BACSConfirmationPresenterProtocolMock.swift */; };
C9BB460927622F4100E6730B /* BACSConfirmationPresenterTests.swift in Sources */ = {isa = PBXBuildFile; fileRef = C9BB460827622F4100E6730B /* BACSConfirmationPresenterTests.swift */; };
Expand Down Expand Up @@ -1066,6 +1067,7 @@
C978F5EE2732CD6A00F59B3C /* FormCardSecurityCodeItemViewTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = FormCardSecurityCodeItemViewTests.swift; sourceTree = "<group>"; };
C982FFD726946F0800AED849 /* AffirmComponent.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AffirmComponent.swift; sourceTree = "<group>"; };
C982FFDB2694792F00AED849 /* AffirmPaymentMethod.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = AffirmPaymentMethod.swift; sourceTree = "<group>"; };
C9B506C22D3E776200AAE686 /* JSONEncoder+SortedKeys.swift.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = "JSONEncoder+SortedKeys.swift.swift"; sourceTree = "<group>"; };
C9BB460327622D9B00E6730B /* BACSConfirmationViewProtocolMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BACSConfirmationViewProtocolMock.swift; sourceTree = "<group>"; };
C9BB460527622E9600E6730B /* BACSConfirmationPresenterProtocolMock.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BACSConfirmationPresenterProtocolMock.swift; sourceTree = "<group>"; };
C9BB460827622F4100E6730B /* BACSConfirmationPresenterTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = BACSConfirmationPresenterTests.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -2661,6 +2663,7 @@
E736497E25277B6500AB76AE /* StringExtension.swift */,
E736498125277B9100AB76AE /* DataExtension.swift */,
E736498325277BAA00AB76AE /* IntegerExtension.swift */,
C9B506C22D3E776200AAE686 /* JSONEncoder+SortedKeys.swift.swift */,
);
path = Extensions;
sourceTree = "<group>";
Expand Down Expand Up @@ -5461,6 +5464,7 @@
E74517A425FB834C000BDCCF /* EncryptedCard.swift in Sources */,
F9F1A98F26CD15C30005CB1D /* RSAOAEP256Algorithm.swift in Sources */,
A0414C342791D9EC00DF3FE9 /* BankDetailsEncryptor.swift in Sources */,
C9B506C32D3E776200AAE686 /* JSONEncoder+SortedKeys.swift.swift in Sources */,
F9F1A98926CD0CCF0005CB1D /* CommonCryptoHelpers.swift in Sources */,
E745179925FB8340000BDCCF /* Card.swift in Sources */,
F92326BD25A366D9002C5BC4 /* CardPayload.swift in Sources */,
Expand Down
8 changes: 4 additions & 4 deletions Adyen/Core/Components/Base/Component.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2022 Adyen N.V.
// Copyright (c) 2019 Adyen N.V.
//
// This file is open source and available under the MIT license. See the LICENSE file for more info.
//
Expand Down Expand Up @@ -78,9 +78,9 @@ public extension Component {
}

private enum AssociatedKeys {
internal static var isDropIn = "isDropInObject"
internal static var isDropIn: Void?

internal static var environment = "environmentObject"
internal static var environment: Void?

internal static var clientKey = "clientKeyObject"
internal static var clientKey: Void?
}
6 changes: 3 additions & 3 deletions Adyen/Core/Components/Base/PaymentComponent.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2022 Adyen N.V.
// Copyright (c) 2019 Adyen N.V.
//
// This file is open source and available under the MIT license. See the LICENSE file for more info.
//
Expand Down Expand Up @@ -96,7 +96,7 @@ extension PaymentAwareComponent {

private enum AssociatedKeys {

internal static var payment = "paymentObject"
internal static var payment: Void?

internal static var order = "orderObject"
internal static var order: Void?
}
2 changes: 1 addition & 1 deletion Adyen/Helpers/UIViewAnimation.swift
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@
import UIKit

private enum AssociatedKeys {
internal static var animations = "animations"
internal static var animations: Void?
}

/// :nodoc:
Expand Down
4 changes: 2 additions & 2 deletions Adyen/UI/Form/Items/Address/AddressViewModel.swift
Original file line number Diff line number Diff line change
@@ -1,5 +1,5 @@
//
// Copyright (c) 2022 Adyen N.V.
// Copyright (c) 2021 Adyen N.V.
//
// This file is open source and available under the MIT license. See the LICENSE file for more info.
//
Expand Down Expand Up @@ -49,7 +49,7 @@ public struct AddressViewModel {
/// :nodoc:
public private(set) var schema: [FormScheme]

// swiftlint:disable function_body_length explicit_acl
// swiftlint:disable function_body_length
internal static subscript(context: AddressViewModelBuilderContext) -> AddressViewModel {
var viewModel = AddressViewModel(labels: [.city: .cityFieldTitle,
.houseNumberOrName: .houseNumberFieldTitle,
Expand Down
Loading
Loading