Skip to content

Commit

Permalink
feat: refactor CI tests - WPB-11406 (#2235)
Browse files Browse the repository at this point in the history
Co-authored-by: Christoph Aldrian <[email protected]>
Co-authored-by: Christoph Aldrian <[email protected]>
  • Loading branch information
3 people authored Dec 3, 2024
1 parent 4d15e81 commit 1cf6e00
Show file tree
Hide file tree
Showing 13 changed files with 1,021 additions and 708 deletions.
677 changes: 86 additions & 591 deletions .github/workflows/_reusable_run_tests.yml

Large diffs are not rendered by default.

16 changes: 10 additions & 6 deletions .github/workflows/test_develop.yml
Original file line number Diff line number Diff line change
@@ -1,19 +1,23 @@
name: Test Develop
name: Nightly Tests

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.114] # List other branches here
uses: ./.github/workflows/_reusable_run_tests.yml
with:
all: true
branch: ${{ matrix.branch }}
notify_secret: WIRE_IOS_NIGHTLY_WEBHOOK
secrets: inherit
73 changes: 15 additions & 58 deletions .github/workflows/test_pr_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -26,41 +26,21 @@ 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-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
with:
lfs: 'true'
lfs: 'false' # as long as we use lfs only for snapshotTesting it should not be useful here
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
wire-ios:
- 'wire-ios/**'
wire-ui:
WireUI:
- 'WireUI/**'
- 'wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireUIAll.xcscheme'
wire-ios-share-engine:
- 'wire-ios-share-engine/**'
wire-ios-notification-engine:
Expand All @@ -69,18 +49,13 @@ jobs:
- 'wire-ios-sync-engine/**'
wire-ios-request-strategy:
- 'wire-ios-request-strategy/**'
wire-api:
WireAPI:
- 'WireAPI/**'
wire-analytics:
- 'WireAnalytics/**'
wire-domain-project:
- 'WireDomain/Project/**'
- 'WireDomain/Sources/WireDomain/**'
- 'WireDomain/Sources/WireDomainSupport/**'
wire-domain:
- 'WireDomain/*.*'
- 'WireDomain/Sources/Package/**'
- 'WireDomain/Sources/PackageSupport/**'
WireAnalytics:
- 'WireAnalytics/Sources/WireAnalytics/**'
- 'WireAnalytics/Sources/WireDatadog/**'
WireDomain:
- 'WireDomain/**'
wire-ios-data-model:
- 'wire-ios-data-model/**'
wire-ios-transport:
Expand All @@ -99,8 +74,9 @@ jobs:
- 'wire-ios-utilities/**'
wire-ios-testing:
- 'wire-ios-testing/**'
wire-foundation:
WireFoundation:
- 'WireFoundation/**'
- 'wire-ios-mono.xcworkspace/xcshareddata/xcschemes/WireFoundationAll.xcscheme'
wire-ios-system:
- 'wire-ios-system/**'
scripts:
Expand All @@ -112,26 +88,7 @@ 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-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 }}
notify_secret: WIRE_IOS_CI_WEBHOOK
secrets: inherit
2 changes: 1 addition & 1 deletion WireAPI/Tests/TestPlans/AllTests.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"testTargets" : [
{
"target" : {
"containerPath" : "container:",
"containerPath" : "container:WireAPI",
"identifier" : "WireAPITests",
"name" : "WireAPITests"
}
Expand Down
2 changes: 1 addition & 1 deletion WireAnalytics/Tests/TestPlans/AllTests.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"testTargets" : [
{
"target" : {
"containerPath" : "container:",
"containerPath" : "container:WireAnalytics",
"identifier" : "WireAnalyticsTests",
"name" : "WireAnalyticsTests"
}
Expand Down
2 changes: 1 addition & 1 deletion WireFoundation/Tests/TestPlans/AllTests.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -16,7 +16,7 @@
"testTargets" : [
{
"target" : {
"containerPath" : "container:",
"containerPath" : "container:WireFoundation",
"identifier" : "WireFoundationTests",
"name" : "WireFoundationTests"
}
Expand Down
40 changes: 20 additions & 20 deletions WireUI/Tests/TestPlans/AllTests.xctestplan
Original file line number Diff line number Diff line change
Expand Up @@ -21,59 +21,59 @@
"testTargets" : [
{
"target" : {
"containerPath" : "container:",
"identifier" : "WireSidebarUITests",
"name" : "WireSidebarUITests"
"containerPath" : "container:WireUI",
"identifier" : "WireMainNavigationUITests",
"name" : "WireMainNavigationUITests"
}
},
{
"target" : {
"containerPath" : "container:WireUI",
"identifier" : "WireSettingsUITests",
"name" : "WireSettingsUITests"
}
},
{
"target" : {
"containerPath" : "container:",
"containerPath" : "container:WireUI",
"identifier" : "WireDesignTests",
"name" : "WireDesignTests"
}
},
{
"target" : {
"containerPath" : "container:",
"identifier" : "WireReusableUIComponentsTests",
"name" : "WireReusableUIComponentsTests"
"containerPath" : "container:WireUI",
"identifier" : "WireSidebarUITests",
"name" : "WireSidebarUITests"
}
},
{
"target" : {
"containerPath" : "container:",
"identifier" : "WireMainNavigationUITests",
"name" : "WireMainNavigationUITests"
"containerPath" : "container:WireUI",
"identifier" : "WireReusableUIComponentsTests",
"name" : "WireReusableUIComponentsTests"
}
},
{
"target" : {
"containerPath" : "container:",
"containerPath" : "container:WireUI",
"identifier" : "WireMoveToFolderUITests",
"name" : "WireMoveToFolderUITests"
}
},
{
"target" : {
"containerPath" : "container:",
"containerPath" : "container:WireUI",
"identifier" : "WireAccountImageUITests",
"name" : "WireAccountImageUITests"
}
},
{
"target" : {
"containerPath" : "container:",
"containerPath" : "container:WireUI",
"identifier" : "WireConversationListUITests",
"name" : "WireConversationListUITests"
}
},
{
"target" : {
"containerPath" : "container:",
"identifier" : "WireSettingsUITests",
"name" : "WireSettingsUITests"
}
}
],
"version" : 1
Expand Down
Loading

0 comments on commit 1cf6e00

Please sign in to comment.