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

test pipeline improvements poc #320

Merged
merged 7 commits into from
Dec 27, 2023
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
4 changes: 2 additions & 2 deletions .github/workflows/test.yml → .github/workflows/test_0.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Test_0

on:
push:
Expand Down Expand Up @@ -55,7 +55,7 @@ jobs:

- name: Test
run: |
bundle exec fastlane test
bundle exec fastlane test_0

- name: Tests reports upload
uses: actions/upload-artifact@v3
Expand Down
65 changes: 65 additions & 0 deletions .github/workflows/test_1.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Test_1

on:
push:
branches:
- main
- feature/*
pull_request:
workflow_dispatch:

env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer

jobs:
test:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Ruby & Bundle setup
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true

- name: Cocoapods cache
uses: actions/cache@v3
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-

- name: Cocoapods install
run: |
bundle exec fastlane run cocoapods

- name: Setup Java 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

- name: WireMock setup
run: |
curl https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-jre8-standalone/2.27.0/wiremock-jre8-standalone-2.27.0.jar -o wiremock.jar -s
bundle exec iostrust add ./wiremock/cert/wiremock.crt
java -jar wiremock.jar --https-port 9099 --root-dir wiremock --https-keystore wiremock/cert/wiremock.jks --keystore-password password --verbose --global-response-templating &

- name: Format check
run: |
bundle exec fastlane format_check

- name: Test
run: |
bundle exec fastlane test_1

- name: Tests reports upload
uses: actions/upload-artifact@v3
if: failure()
with:
name: tests-reports
path: "fastlane/test_output"
65 changes: 65 additions & 0 deletions .github/workflows/test_2.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: Test_2

on:
push:
branches:
- main
- feature/*
pull_request:
workflow_dispatch:

env:
DEVELOPER_DIR: /Applications/Xcode_14.2.app/Contents/Developer

jobs:
test:
runs-on: macos-latest

steps:
- name: Checkout
uses: actions/checkout@v3

- name: Ruby & Bundle setup
uses: ruby/setup-ruby@v1
with:
ruby-version: 2.6
bundler-cache: true

- name: Cocoapods cache
uses: actions/cache@v3
with:
path: Pods
key: ${{ runner.os }}-pods-${{ hashFiles('**/Podfile.lock') }}
restore-keys: |
${{ runner.os }}-pods-

- name: Cocoapods install
run: |
bundle exec fastlane run cocoapods

- name: Setup Java 11
uses: actions/setup-java@v3
with:
distribution: 'temurin'
java-version: '11'

- name: WireMock setup
run: |
curl https://repo1.maven.org/maven2/com/github/tomakehurst/wiremock-jre8-standalone/2.27.0/wiremock-jre8-standalone-2.27.0.jar -o wiremock.jar -s
bundle exec iostrust add ./wiremock/cert/wiremock.crt
java -jar wiremock.jar --https-port 9099 --root-dir wiremock --https-keystore wiremock/cert/wiremock.jks --keystore-password password --verbose --global-response-templating &

- name: Format check
run: |
bundle exec fastlane format_check

- name: Test
run: |
bundle exec fastlane test_2

- name: Tests reports upload
uses: actions/upload-artifact@v3
if: failure()
with:
name: tests-reports
path: "fastlane/test_output"
Original file line number Diff line number Diff line change
Expand Up @@ -729,14 +729,7 @@
A82D7DF12A04FEAB001302A8 /* CRMRAIDUtils.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = CRMRAIDUtils.swift; sourceTree = "<group>"; };
A82D7DF32A0A3ED4001302A8 /* MRAIDUtilsTests.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MRAIDUtilsTests.swift; sourceTree = "<group>"; };
A82D7E1D2A20B28E001302A8 /* CriteoPublisherSdkMC1.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CriteoPublisherSdkMC1.xctestplan; sourceTree = "<group>"; };
A82D7E1E2A20B28E001302A8 /* CriteoPublisherSdkMC9.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CriteoPublisherSdkMC9.xctestplan; sourceTree = "<group>"; };
A82D7E1F2A20B28E001302A8 /* CriteoPublisherSdkMC4.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CriteoPublisherSdkMC4.xctestplan; sourceTree = "<group>"; };
A82D7E202A20B28E001302A8 /* CriteoPublisherSdkMC3.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CriteoPublisherSdkMC3.xctestplan; sourceTree = "<group>"; };
A82D7E212A20B28E001302A8 /* CriteoPublisherSdkMC6.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CriteoPublisherSdkMC6.xctestplan; sourceTree = "<group>"; };
A82D7E222A20B28E001302A8 /* CriteoPublisherSdkMC8.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CriteoPublisherSdkMC8.xctestplan; sourceTree = "<group>"; };
A82D7E232A20B28E001302A8 /* CriteoPublisherSdkMC5.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CriteoPublisherSdkMC5.xctestplan; sourceTree = "<group>"; };
A82D7E242A20B28E001302A8 /* CriteoPublisherSdkMC0.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CriteoPublisherSdkMC0.xctestplan; sourceTree = "<group>"; };
A82D7E252A20B28E001302A8 /* CriteoPublisherSdkMC7.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CriteoPublisherSdkMC7.xctestplan; sourceTree = "<group>"; };
A82D7E262A20B28E001302A8 /* CriteoPublisherSdkMC2.xctestplan */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = text; path = CriteoPublisherSdkMC2.xctestplan; sourceTree = "<group>"; };
A83BB58929BAEB69002A63B6 /* ActionRepresentable.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = ActionRepresentable.swift; sourceTree = "<group>"; };
A83BB58B29BAEBC9002A63B6 /* MRAIDLog.swift */ = {isa = PBXFileReference; lastKnownFileType = sourcecode.swift; path = MRAIDLog.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -1576,15 +1569,8 @@
A82D7E1C2A20B28E001302A8 /* TestPlans */ = {
isa = PBXGroup;
children = (
A82D7E1D2A20B28E001302A8 /* CriteoPublisherSdkMC1.xctestplan */,
A82D7E1E2A20B28E001302A8 /* CriteoPublisherSdkMC9.xctestplan */,
A82D7E1F2A20B28E001302A8 /* CriteoPublisherSdkMC4.xctestplan */,
A82D7E202A20B28E001302A8 /* CriteoPublisherSdkMC3.xctestplan */,
A82D7E212A20B28E001302A8 /* CriteoPublisherSdkMC6.xctestplan */,
A82D7E222A20B28E001302A8 /* CriteoPublisherSdkMC8.xctestplan */,
A82D7E232A20B28E001302A8 /* CriteoPublisherSdkMC5.xctestplan */,
A82D7E242A20B28E001302A8 /* CriteoPublisherSdkMC0.xctestplan */,
A82D7E252A20B28E001302A8 /* CriteoPublisherSdkMC7.xctestplan */,
A82D7E1D2A20B28E001302A8 /* CriteoPublisherSdkMC1.xctestplan */,
A82D7E262A20B28E001302A8 /* CriteoPublisherSdkMC2.xctestplan */,
);
path = TestPlans;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -38,33 +38,12 @@
<TestPlanReference
reference = "container:Tests/TestPlans/CriteoPublisherSdkMC1.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:Tests/TestPlans/CriteoPublisherSdkMC3.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:Tests/TestPlans/CriteoPublisherSdkMC0.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:Tests/TestPlans/CriteoPublisherSdkMC2.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:Tests/TestPlans/CriteoPublisherSdkMC4.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:Tests/TestPlans/CriteoPublisherSdkMC5.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:Tests/TestPlans/CriteoPublisherSdkMC6.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:Tests/TestPlans/CriteoPublisherSdkMC7.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:Tests/TestPlans/CriteoPublisherSdkMC8.xctestplan">
</TestPlanReference>
<TestPlanReference
reference = "container:Tests/TestPlans/CriteoPublisherSdkMC9.xctestplan">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -25,9 +25,9 @@ public protocol MRAIDMessageHandlerDelegate: AnyObject {
}

public struct MRAIDMessageHandler {
private unowned var logHandler: MRAIDLogHandler
private unowned var urlHandler: MRAIDURLHandler
public unowned var delegate: MRAIDMessageHandlerDelegate!
private var logHandler: MRAIDLogHandler
private var urlHandler: MRAIDURLHandler
public var delegate: MRAIDMessageHandlerDelegate!

public init(logHandler: MRAIDLogHandler, urlHandler: MRAIDURLHandler) {
self.logHandler = logHandler
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -63,27 +63,8 @@
"CR_BidManagerIntegrationTests\/test_givenPrefetchingBid_whenSilenceModeBid_shouldProvideEmptyBid",
"CR_BidManagerIntegrationTests\/test_givenPrefetchingBid_whenUserSilenceModeBid_shouldProvideEmptyBid",
"CR_BidPerformanceTests\/test500Bids",
"CR_BidRequestSerializerTests",
"CR_CASBoundedFileObjectQueueTests",
"CR_CacheAdUnitTests",
"CR_CacheManagerTests",
"CR_CdbBidTests",
"CR_CdbResponseTests",
"CR_ConfigManagerTests",
"CR_ConfigTests",
"CR_ContextualFunctionalTests",
"CR_DataConsentFunctionalTests",
"CR_DataProtectionConsentTests",
"CR_DefaultFileManipulatorTests",
"CR_DefaultMediaDownloaderTests",
"CR_DeviceInfoTests",
"CR_DfpBannerFunctionalTests",
"CR_DfpBannerFunctionalTests\/test_givenValidBanner_whenLoadingDfpBanner_thenDfpViewContainsCreative",
"CR_DfpInterstitialFunctionalTests",
"CR_DfpInterstitialFunctionalTests\/test_givenValidInterstitial_whenLoadingDfpInterstitial_thenDfpViewContainsCreative",
"CR_DfpNativeFunctionalTests",
"CR_DfpRewardedFunctionalTests",
"CR_DisplaySizeInjectorTests",
"CR_FeedbackControllerTests",
"CR_FeedbackControllerTests\/testOnCdbCallFailure_GivenTimeoutError_UpdateAllForTimeout",
"CR_FeedbackFeatureGuardTests",
Expand Down Expand Up @@ -175,6 +156,7 @@
"CR_RemoteLogRecordSerializerTests",
"CR_RemoteLogRecordTests",
"CR_RemoteLogStorageTests",
"CR_SKAdNetworkImpressionTests",
"CR_SKAdNetworkParametersTests",
"CR_SafeMediaDownloaderTests",
"CR_StandaloneBannerFunctionalTests",
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,6 +70,16 @@
"CR_BidPerformanceTests",
"CR_BidPerformanceTests\/test500Bids",
"CR_BidRequestSerializerSwiftTests",
"CR_BidRequestSerializerTests",
"CR_CASBoundedFileObjectQueueTests",
"CR_CacheAdUnitTests",
"CR_CacheManagerTests",
"CR_CdbBidTests",
"CR_CdbResponseTests",
"CR_ConfigManagerTests",
"CR_ConfigTests",
"CR_ContextualFunctionalTests",
"CR_DataConsentFunctionalTests",
"CR_DataProtectionConsentTests",
"CR_DefaultFileManipulatorTests",
"CR_DefaultMediaDownloaderTests",
Expand All @@ -81,50 +91,28 @@
"CR_DfpNativeFunctionalTests",
"CR_DfpRewardedFunctionalTests",
"CR_DisplaySizeInjectorTests",
"CR_FeedbackControllerTests",
"CR_FeedbackControllerTests\/testOnCdbCallFailure_GivenTimeoutError_UpdateAllForTimeout",
"CR_FeedbackFeatureGuardTests",
"CR_FeedbackFileManagerTests",
"CR_FeedbackMessageFunctionalTests",
"CR_FeedbackMessageFunctionalTests\/testGivenFeedbackRequestError_whenLiveBidsTimeBudgetExceeded_thenFeedbackRequest",
"CR_FeedbackMessageFunctionalTests\/testGivenTimeoutErrorOnPrefetch_whenGettingBid_thenSendFeedbackMessage",
"CR_FeedbackMessageFunctionalTests\/testGivenTimeoutErrorOnPrefetch_whenGettingLiveBid_thenSendFeedbackMessage",
"CR_FeedbackMessageFunctionalTests\/testGivenTimeoutErrorOnPrefetch_whenLiveBidTimeBudgetExceeded_thenSendFeedbackMessage",
"CR_FeedbackMessageTests",
"CR_FeedbackMessageTests\/testFullyFilledObjectsAreEqual()",
"CR_FeedbackSerializerTests",
"CR_FeedbackSerializerTests\/testAnyMessageContainsSlotsField()",
"CR_FeedbackSerializerTests\/testConfigValuesPassed()",
"CR_FeedbackStorageTests",
"CR_FeedbackStorageTests\/test_initWithActiveMessages_ShouldBeMovedToSendingQueue()",
"CR_FeedbackStorageTests\/test_requestFor_ReadyToSendMessages_ShouldReturnEverythingFromQueue()",
"CR_FeedbackStorageTests\/test_updateByDifferentAdUnit_shouldReadByDifferentFilename()",
"CR_FeedbackStorageTests\/test_updateBySameAdUnit_shouldReadBySameFilename()",
"CR_FeedbackStorageTests\/test_updateMessageToRTS_messageShouldBeMovedToSendingQueue()",
"CR_FeedbackStorageTests\/test_updateNonexistentMessage_ShouldCreateFile()",
"CR_GdprSerializerTests",
"CR_GdprSerializerTests\/testGdprTcf1()",
"CR_GdprSerializerTests\/testGdprTcf2()",
"CR_GdprSerializerTests\/testNoConsentString()",
"CR_GdprSerializerTests\/testNoGdprApplies()",
"CR_GdprTests",
"CR_GdprTests\/testBadConsentStringTypeInUserDefaultsTcf2_0",
"CR_HeaderBiddingDictionaryFunctionalTests",
"CR_HeaderBiddingTests",
"CR_HttpTests",
"CR_ImageCacheTests",
"CR_ImpressionDetectionTests",
"CR_InHouseFunctionalTests",
"CR_InHouseFunctionalTests\/test_givenInterstitialLoadWrongBid_whenLoadGoodBid_thenReceiveAd",
"CR_InHouseFunctionalTests\/test_givenInterstitial_whenLoadWrongBid_thenFailToReceiveAd",
"CR_IntegrationRegistryTests",
"CR_IntegrationsTestBase",
"CR_InternalContextProviderTests",
"CR_InternalContextProviderTests\/testFetchInternalUserContext_GivenRealData_PutProperInformation",
"CR_LogHandlerTests",
"CR_LoggingFunctionalTests",
"CR_LoggingTests",
"CR_NativeAdFunctionalTests",
"CR_NativeAdFunctionalTests\/testAdCellFilledWithDataInTableViewWithPreProdContent",
"CR_NativeAdFunctionalTests\/testAdLoadedInTableView",
"CR_NativeAdFunctionalTests\/testGivenNativeAdLoaderNotRetained_whenClickOnAd_thenClickDetected",
Expand All @@ -138,12 +126,6 @@
"CR_NativeAdFunctionalTests\/testGivenNativeAds_whenLoadingAllNativeAd_triggerImpressionForVisibleAd",
"CR_NativeAdFunctionalTests\/testGivenNativeAds_whenScrolling_triggerAllImpression",
"CR_NativeAdFunctionalTests\/testGivenNativeAds_whenTapOnLastOne_thenDetectClick",
"CR_NativeAdvertiserTests",
"CR_NativeAssetsTests",
"CR_NativeImageTests",
"CR_NativePrivacyTests",
"CR_NativeProductTests",
"CR_NetworkManagerTests",
"CR_NetworkManagerTests\/testGetWithoutResponseHandlerDoesNotCrash",
"CR_NetworkManagerTests\/testNetworkManagerFailedSerialization",
"CR_NetworkManagerTests\/testNetworkManagerPostCall",
Expand All @@ -164,7 +146,6 @@
"CR_ProfileIdFunctionalTests\/testStandaloneBanner_GivenAnyPreviousIntegration_UseStandaloneProfileId",
"CR_ProfileIdFunctionalTests\/testStandaloneInterstitial_GivenAnyPreviousIntegration_UseStandaloneProfileId",
"CR_ProfileIdFunctionalTests\/testStandaloneNative_GivenAnyPreviousIntegration_UseStandaloneProfileId",
"CR_RegistrationFunctionalTests",
"CR_RegistrationFunctionalTests\/test_givenCriteoInitWithBanner_whenRegisterTwice_thenOneCBDCall",
"CR_RegistrationFunctionalTests\/test_givenCriteoInitWithInterstitial_whenRegisterTwice_thenOneCBDCall",
"CR_RegistrationFunctionalTests\/test_givenCriteoInitWithNative_whenRegisterTwice_thenOneCBDCall",
Expand All @@ -173,6 +154,7 @@
"CR_RemoteLogRecordSerializerTests",
"CR_RemoteLogRecordTests",
"CR_RemoteLogStorageTests",
"CR_SKAdNetworkImpressionTests",
"CR_SKAdNetworkParametersTests",
"CR_SafeMediaDownloaderTests",
"CR_StandaloneBannerFunctionalTests",
Expand Down
Loading
Loading