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

feat: refactor CI tests - WPB-11406 #1707

Draft
wants to merge 45 commits into
base: develop
Choose a base branch
from
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
45 commits
Select commit Hold shift + click to select a range
9b4ef1f
wip
netbe Jul 3, 2024
f9b9bc9
wip
netbe Jul 16, 2024
cb96d2f
wip
netbe Sep 10, 2024
b1b5fb3
test workflow
netbe Sep 10, 2024
3a659be
test
netbe Sep 10, 2024
4f810e5
fix workflow
netbe Sep 10, 2024
c6cf069
wip
netbe Sep 10, 2024
1eaefcf
test
netbe Sep 10, 2024
58d0572
test
netbe Sep 10, 2024
6e1df52
test
netbe Sep 10, 2024
230f481
fix
netbe Sep 10, 2024
742b635
test
netbe Sep 10, 2024
12e6a09
final
netbe Sep 10, 2024
b022931
fix error
netbe Sep 10, 2024
bb34714
Revert "test"
netbe Sep 10, 2024
28595d8
remove space
netbe Sep 10, 2024
a55b237
fix workflows
netbe Sep 10, 2024
df226c3
fix all_folders
netbe Sep 10, 2024
11b4ff2
wip refactor framework
netbe Sep 10, 2024
4a86cd3
add prompt if no values given
netbe Sep 10, 2024
3f1a0a1
clean up
netbe Sep 10, 2024
05e2fe4
fix
netbe Sep 10, 2024
257c202
Merge branch 'develop' into feat/refactor-ci-tests
netbe Sep 10, 2024
35a5db8
try modify develop workflow to run on schedule
netbe Sep 10, 2024
49914b7
fix workflow
netbe Sep 10, 2024
b939a2b
add release branch
netbe Sep 10, 2024
3c39e8c
Merge branch 'develop' into feat/refactor-ci-tests
netbe Oct 2, 2024
3f4ee94
make WireFoundation testable
netbe Oct 2, 2024
f29b819
notify failure for all tests of release and develop
netbe Oct 2, 2024
7f2e25e
fix testing WireDomain and WireAPI
netbe Oct 2, 2024
79f252b
reorganise files
netbe Oct 2, 2024
bcdc7b2
test warnings loop
netbe Oct 2, 2024
283388b
fix name of folders matching frameworks
netbe Oct 2, 2024
42d8842
remove non matching frameworks - nil
netbe Oct 2, 2024
c5e85d9
fix WireDomain
netbe Oct 2, 2024
b4296aa
fix plans location
netbe Oct 2, 2024
374d684
add always condition
netbe Oct 3, 2024
0383840
rework the warnings into a job
netbe Oct 3, 2024
1797a97
fix
netbe Oct 3, 2024
0b44c5e
Merge branch 'develop' into feat/refactor-ci-tests
netbe Oct 10, 2024
fc4ea55
fix syntax
netbe Oct 10, 2024
9381371
test
netbe Oct 10, 2024
59070b7
fix xcresults
netbe Oct 10, 2024
548507c
fix xcrun not found
netbe Oct 10, 2024
1a03543
Merge branch 'develop' into feat/refactor-ci-tests
netbe Oct 10, 2024
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
666 changes: 59 additions & 607 deletions .github/workflows/_reusable_run_tests.yml

Large diffs are not rendered by default.

15 changes: 9 additions & 6 deletions .github/workflows/test_develop.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,22 @@
name: Test Develop
name: Test Develop and Release branches

on:
workflow_dispatch:
push:
branches:
- 'develop'

schedule:
- cron: "0 21 * * *"

# This is what will cancel the workflow
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true

jobs:
trigger_tests_develop:
trigger_tests:
strategy:
matrix:
branch: [develop, release/cycle-3.113] # List other branches here
uses: ./.github/workflows/_reusable_run_tests.yml
Copy link
Collaborator Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

we'll need to apply these changes to the release branch in order for it to work (at least adding test plans)

with:
all: true
branch: ${{ matrix.branch }}
secrets: inherit
65 changes: 10 additions & 55 deletions .github/workflows/test_pr_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,29 +26,7 @@ jobs:
runs-on: ubuntu-latest
# Set job outputs to values from filter step
outputs:
wire-ios: ${{ steps.filter.outputs.wire-ios == 'true' || steps.filter.outputs.carthage == 'true' }}
wire-ui: ${{ steps.filter.outputs.wire-ui }}
wire-ios-sync-engine: ${{ steps.filter.outputs.wire-ios-sync-engine }}
wire-ios-data-model: ${{ steps.filter.outputs.wire-ios-data-model }}
wire-ios-system: ${{ steps.filter.outputs.wire-ios-system }}
wire-ios-request-strategy: ${{ steps.filter.outputs.wire-ios-request-strategy }}
wire-api: ${{ steps.filter.outputs.wire-api }}
wire-analytics: ${{ steps.filter.outputs.wire-analytics }}
wire-datadog: ${{ steps.filter.outputs.wire-datadog }}
wire-domain-project: ${{ steps.filter.outputs.wire-domain-project }}
wire-domain: ${{ steps.filter.outputs.wire-domain }}
wire-ios-transport: ${{ steps.filter.outputs.wire-ios-transport }}
wire-ios-share-engine: ${{ steps.filter.outputs.wire-ios-share-engine }}
wire-ios-cryptobox: ${{ steps.filter.outputs.wire-ios-cryptobox }}
wire-ios-mocktransport: ${{ steps.filter.outputs.wire-ios-mocktransport }}
wire-ios-notification-engine: ${{ steps.filter.outputs.wire-ios-notification-engine }}
wire-ios-protos: ${{ steps.filter.outputs.wire-ios-protos }}
wire-ios-images: ${{ steps.filter.outputs.wire-ios-images }}
wire-ios-link-preview : ${{ steps.filter.outputs.wire-ios-link-preview }}
wire-ios-utilities: ${{ steps.filter.outputs.wire-ios-utilities }}
wire-ios-testing: ${{ steps.filter.outputs.wire-ios-testing }}
wire-foundation: ${{ steps.filter.outputs.wire-foundation }}
scripts: ${{ steps.filter.outputs.scripts }}
folders: ${{ steps.filter.outputs.changes }}

steps:
- uses: actions/checkout@v4
Expand All @@ -60,7 +38,7 @@ jobs:
filters: |
wire-ios:
- 'wire-ios/**'
wire-ui:
WireUI:
- 'WireUI/**'
wire-ios-share-engine:
- 'wire-ios-share-engine/**'
Expand All @@ -70,20 +48,18 @@ jobs:
- 'wire-ios-sync-engine/**'
wire-ios-request-strategy:
- 'wire-ios-request-strategy/**'
wire-api:
WireAPI:
- 'WireAPI/**'
wire-analytics:
WireAnalytics:
- 'WireAnalytics/Sources/WireAnalytics/**'
wire-datadog:
- 'WireAnalytics/Sources/WireDatadog/**'
wire-domain-project:
WireDomain:
- 'WireDomain/Project/**'
- 'WireDomain/Sources/WireDomain/**'
- 'WireDomain/Sources/WireDomainSupport/**'
wire-domain:
- 'WireDomain/*.*'
- 'WireDomain/Sources/Package/**'
- 'WireDomain/Sources/PackageSupport/**'
- 'WireDomain/Sources/WireDomain/**'
- 'WireDomain/Sources/WireDomainSupport/**'
wire-ios-data-model:
- 'wire-ios-data-model/**'
wire-ios-transport:
Expand All @@ -102,7 +78,7 @@ jobs:
- 'wire-ios-utilities/**'
wire-ios-testing:
- 'wire-ios-testing/**'
wire-foundation:
WireFoundation:
- 'WireFoundation/**'
wire-ios-system:
- 'wire-ios-system/**'
Expand All @@ -115,27 +91,6 @@ jobs:
needs: detect-changes
uses: ./.github/workflows/_reusable_run_tests.yml
with:
wire-ios: ${{ needs.detect-changes.outputs.wire-ios == 'true' }}
wire-ui: ${{ needs.detect-changes.outputs.wire-ui == 'true' }}
wire-ios-sync-engine: ${{ needs.detect-changes.outputs.wire-ios-sync-engine == 'true' }}
wire-ios-data-model: ${{ needs.detect-changes.outputs.wire-ios-data-model == 'true' }}
wire-ios-system: ${{ needs.detect-changes.outputs.wire-ios-system == 'true' }}
wire-ios-request-strategy: ${{ needs.detect-changes.outputs.wire-ios-request-strategy == 'true' }}
wire-api: ${{ needs.detect-changes.outputs.wire-api == 'true' }}
wire-analytics: ${{ needs.detect-changes.outputs.wire-analytics == 'true' }}
wire-datadog: ${{ needs.detect-changes.outputs.wire-datadog == 'true' }}
wire-domain-project: ${{ needs.detect-changes.outputs.wire-domain-project == 'true' }}
wire-domain: ${{ needs.detect-changes.outputs.wire-domain == 'true' }}
wire-ios-transport: ${{ needs.detect-changes.outputs.wire-ios-transport == 'true' }}
wire-ios-share-engine: ${{ needs.detect-changes.outputs.wire-ios-share-engine == 'true' }}
wire-ios-cryptobox: ${{ needs.detect-changes.outputs.wire-ios-cryptobox == 'true' }}
wire-ios-mocktransport: ${{ needs.detect-changes.outputs.wire-ios-mocktransport == 'true' }}
wire-ios-notification-engine: ${{ needs.detect-changes.outputs.wire-ios-notification-engine == 'true' }}
wire-ios-protos: ${{ needs.detect-changes.outputs.wire-ios-protos == 'true' }}
wire-ios-images: ${{ needs.detect-changes.outputs.wire-ios-images == 'true' }}
wire-ios-link-preview: ${{ needs.detect-changes.outputs.wire-ios-link-preview == 'true' }}
wire-ios-utilities: ${{ needs.detect-changes.outputs.wire-ios-utilities == 'true' }}
wire-ios-testing: ${{ needs.detect-changes.outputs.wire-ios-testing == 'true' }}
wire-foundation: ${{ needs.detect-changes.outputs.wire-foundation == 'true' }}
scripts: ${{ needs.detect-changes.outputs.scripts == 'true' }}
folders: ${{ join(fromJson(needs.detect-changes.outputs.folders), ',') }}
branch: ${{ github.head_ref }}
secrets: inherit
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:.swiftpm/WireAPI.xctestplan"
reference = "container:.swiftpm/AllTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -14,7 +14,7 @@
"testTargets" : [
{
"target" : {
"containerPath" : "container:",
"containerPath" : "container:..\/..\/WireAPI",
"identifier" : "WireAPITests",
"name" : "WireAPITests"
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -18,6 +18,13 @@
"identifier" : "01D0DCAF2C1C8C880076CB1C",
"name" : "WireDomainTests"
}
},
{
"target" : {
"containerPath" : "container:..\/WireDomain",
"identifier" : "WireDomainPkgTests",
"name" : "WireDomainPkgTests"
}
}
],
"version" : 1
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -151,7 +151,7 @@
01D0DCC32C1C8CC20076CB1C /* WireDataModel.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = WireDataModel.framework; sourceTree = BUILT_PRODUCTS_DIR; };
01D0DCC52C1C8CD90076CB1C /* WireTransport.framework */ = {isa = PBXFileReference; explicitFileType = wrapper.framework; path = WireTransport.framework; sourceTree = BUILT_PRODUCTS_DIR; };
01D0DCE92C1C8EA10076CB1C /* WireDomain.docc */ = {isa = PBXFileReference; lastKnownFileType = folder.documentationcatalog; path = WireDomain.docc; sourceTree = "<group>"; };
01D0DCFC2C1C8F9B0076CB1C /* WireDomain.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = WireDomain.xctestplan; sourceTree = "<group>"; };
01D0DCFC2C1C8F9B0076CB1C /* AllTests.xctestplan */ = {isa = PBXFileReference; lastKnownFileType = text; path = AllTests.xctestplan; sourceTree = "<group>"; };
1623564F2C2B223100C6666C /* UserRepositoryTests.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = UserRepositoryTests.swift; sourceTree = "<group>"; };
C91F111A2C9C4B2B00BA5BE2 /* ConnectionsRepository.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionsRepository.swift; sourceTree = "<group>"; };
C91F111B2C9C4B2B00BA5BE2 /* ConnectionsLocalStore.swift */ = {isa = PBXFileReference; fileEncoding = 4; lastKnownFileType = sourcecode.swift; path = ConnectionsLocalStore.swift; sourceTree = "<group>"; };
Expand Down Expand Up @@ -374,7 +374,7 @@
01D0DC9C2C1C8C870076CB1C = {
isa = PBXGroup;
children = (
01D0DCFC2C1C8F9B0076CB1C /* WireDomain.xctestplan */,
01D0DCFC2C1C8F9B0076CB1C /* AllTests.xctestplan */,
01D0DCE82C1C8EA10076CB1C /* Sources */,
01D0DCED2C1C8EA10076CB1C /* Tests */,
01D0DCE92C1C8EA10076CB1C /* WireDomain.docc */,
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:WireDomain.xctestplan"
reference = "container:AllTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -30,7 +30,7 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:.swiftpm/WireFoundation.xctestplan"
reference = "container:Project/AllTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:.swiftpm/WireUI.xctestplan"
reference = "container:Project/AllTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -17,36 +17,36 @@
{
"target" : {
"containerPath" : "container:",
"identifier" : "WireReusableUIComponentsTests",
"name" : "WireReusableUIComponentsTests"
"identifier" : "WireAccountImageTests",
"name" : "WireAccountImageTests"
}
},
{
"target" : {
"containerPath" : "container:",
"identifier" : "WireMainNavigationTests",
"name" : "WireMainNavigationTests"
"identifier" : "WireDesignTests",
"name" : "WireDesignTests"
}
},
{
"target" : {
"containerPath" : "container:",
"identifier" : "WireSidebarTests",
"name" : "WireSidebarTests"
"identifier" : "WireMainNavigationTests",
"name" : "WireMainNavigationTests"
}
},
{
"target" : {
"containerPath" : "container:",
"identifier" : "WireAccountImageTests",
"name" : "WireAccountImageTests"
"identifier" : "WireReusableUIComponentsTests",
"name" : "WireReusableUIComponentsTests"
}
},
{
"target" : {
"containerPath" : "container:",
"identifier" : "WireDesignTests",
"name" : "WireDesignTests"
"identifier" : "WireSidebarTests",
"name" : "WireSidebarTests"
}
}
],
Expand Down
Loading
Loading