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

chore: unify schemes and test plans - WPB-11406 #2222

Merged
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
41 changes: 12 additions & 29 deletions .github/workflows/_reusable_run_tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -37,10 +37,6 @@ on:
type: boolean
default: false
required: false
wire-datadog:
type: boolean
default: false
required: false
wire-domain-project:
type: boolean
default: false
Expand Down Expand Up @@ -456,7 +452,7 @@ jobs:
run: |
echo "WireAPI has changes"
echo "Building WireAPI..."
xcodebuild build-for-testing -workspace wire-ios-mono.xcworkspace -scheme WireAPI -resultBundlePath xcodebuild-wire-api.xcresult -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee xcodebuild-wire-api.log | bundle exec xcpretty
xcodebuild build-for-testing -workspace wire-ios-mono.xcworkspace -scheme WireAPI-Package -resultBundlePath xcodebuild-wire-api.xcresult -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee xcodebuild-wire-api.log | bundle exec xcpretty

- uses: wireapp/analyze-xcoderesults-action@v1
if: ${{ inputs.wire-api || inputs.all }}
Expand All @@ -469,35 +465,17 @@ jobs:
if: ${{ inputs.wire-api || inputs.all }}
run: |
echo "Testing WireAPI..."
xcodebuild test -workspace wire-ios-mono.xcworkspace -scheme WireAPI -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee -a xcodebuild-wire-api.log | bundle exec xcpretty --report junit --output build/reports/WireAPI.junit
xcodebuild test -workspace wire-ios-mono.xcworkspace -scheme WireAPI-Package -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee -a xcodebuild-wire-api.log | bundle exec xcpretty --report junit --output build/reports/WireAPI.junit
exit ${PIPESTATUS[0]}

# WireDatadog

- name: Build WireDatadog
if: ${{ inputs.wire-datadog || inputs.all }}
run: |
echo "WireDatadog has changes"
echo "Building WireDatadog..."
xcodebuild build-for-testing -workspace wire-ios-mono.xcworkspace -scheme WireDatadog -resultBundlePath xcodebuild-wire-datadog.xcresult -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee xcodebuild-wire-datadog.log | bundle exec xcpretty

- uses: wireapp/analyze-xcoderesults-action@v1
if: ${{ inputs.wire-datadog || inputs.all }}
with:
results: xcodebuild-wire-datadog.xcresult
warningAnnotations: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# No tests exist for WireDatadog currently

# WireAnalytics

- name: Build WireAnalytics
if: ${{ inputs.wire-analytics || inputs.all }}
run: |
echo "WireAnalytics has changes"
echo "Building WireAnalytics..."
xcodebuild build-for-testing -workspace wire-ios-mono.xcworkspace -scheme WireAnalytics -resultBundlePath xcodebuild-wire-analytics.xcresult -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee xcodebuild-wire-analytics.log | bundle exec xcpretty
xcodebuild build-for-testing -workspace wire-ios-mono.xcworkspace -scheme WireAnalytics-Package -resultBundlePath xcodebuild-wire-analytics.xcresult -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee xcodebuild-wire-analytics.log | bundle exec xcpretty

- uses: wireapp/analyze-xcoderesults-action@v1
if: ${{ inputs.wire-analytics || inputs.all }}
Expand All @@ -506,7 +484,12 @@ jobs:
warningAnnotations: true
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}

# No tests exist for WireAnalytics currently
- name: Test WireAnalytics
if: ${{ inputs.wire-analytics || inputs.all }}
run: |
echo "Testing WireAnalytics..."
xcodebuild test -workspace wire-ios-mono.xcworkspace -scheme WireAnalytics-Package -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee -a xcodebuild-wire-analytics.log | bundle exec xcpretty --report junit --output build/reports/WireAnalytics.junit
exit ${PIPESTATUS[0]}

# WireDomain

Expand All @@ -515,7 +498,7 @@ jobs:
run: |
echo "WireDomain has changes"
echo "Building WireDomain..."
xcodebuild build-for-testing -workspace wire-ios-mono.xcworkspace -scheme WireDomainPackage -resultBundlePath xcodebuild-wire-domain.xcresult -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee xcodebuild-wire-domain.log | bundle exec xcpretty
xcodebuild build-for-testing -workspace wire-ios-mono.xcworkspace -scheme WireDomain-Package -resultBundlePath xcodebuild-wire-domain.xcresult -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee xcodebuild-wire-domain.log | bundle exec xcpretty

- uses: wireapp/analyze-xcoderesults-action@v1
if: ${{ inputs.wire-domain || inputs.all }}
Expand All @@ -528,7 +511,7 @@ jobs:
if: ${{ inputs.wire-domain || inputs.all }}
run: |
echo "Testing WireDomain..."
xcodebuild test -workspace wire-ios-mono.xcworkspace -scheme WireDomainPackage -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee -a xcodebuild-wire-domain.log | bundle exec xcpretty --report junit --output build/reports/WireDomain.junit
xcodebuild test -workspace wire-ios-mono.xcworkspace -scheme WireDomain-Package -destination 'platform=iOS Simulator,OS=${{ env.IOS_VERSION }},name=${{ env.IPHONE_MODEL }}' | tee -a xcodebuild-wire-domain.log | bundle exec xcpretty --report junit --output build/reports/WireDomain.junit
exit ${PIPESTATUS[0]}

# WireDomain Project
Expand Down Expand Up @@ -625,7 +608,7 @@ jobs:

# WireUI

- name: Test WireUI
- name: Build WireUI
if: ${{ inputs.wire-ui || inputs.all }}
run: |
echo "WireUI has changes"
Expand Down
6 changes: 1 addition & 5 deletions .github/workflows/test_pr_changes.yml
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,6 @@ jobs:
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 }}
Expand Down Expand Up @@ -73,9 +72,7 @@ jobs:
wire-api:
- 'WireAPI/**'
wire-analytics:
- 'WireAnalytics/Sources/WireAnalytics/**'
wire-datadog:
- 'WireAnalytics/Sources/WireDatadog/**'
- 'WireAnalytics/**'
wire-domain-project:
- 'WireDomain/Project/**'
- 'WireDomain/Sources/WireDomain/**'
Expand Down Expand Up @@ -123,7 +120,6 @@ jobs:
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' }}
Expand Down
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1530"
LastUpgradeVersion = "1610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -21,6 +21,20 @@
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WireAPISupport"
BuildableName = "WireAPISupport"
BlueprintName = "WireAPISupport"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand All @@ -30,14 +44,13 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:.swiftpm/WireAPI.xctestplan"
reference = "container:Tests/TestPlans/AllTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO"
parallelizable = "YES">
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WireAPITests"
Expand Down

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,14 +1,16 @@
{
"configurations" : [
{
"id" : "CA909C45-1D66-4C47-BBFD-53CA3AB99A82",
"name" : "Test Scheme Action",
"id" : "FDB58F5E-9DC3-4935-B919-AA295F684D19",
"name" : "Configuration 1",
"options" : {

}
}
],
"defaultOptions" : {
"language" : "en",
"region" : "DE",
"testExecutionOrdering" : "random"
},
"testTargets" : [
Expand Down
24 changes: 0 additions & 24 deletions WireAnalytics/.swiftpm/WireAnalytics.xctestplan

This file was deleted.

Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
<?xml version="1.0" encoding="UTF-8"?>
<Scheme
LastUpgradeVersion = "1540"
LastUpgradeVersion = "1610"
version = "1.7">
<BuildAction
parallelizeBuildables = "YES"
Expand All @@ -21,6 +21,34 @@
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WireAnalyticsSupport"
BuildableName = "WireAnalyticsSupport"
BlueprintName = "WireAnalyticsSupport"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
<BuildActionEntry
buildForTesting = "YES"
buildForRunning = "YES"
buildForProfiling = "YES"
buildForArchiving = "YES"
buildForAnalyzing = "YES">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WireDatadog"
BuildableName = "WireDatadog"
BlueprintName = "WireDatadog"
ReferencedContainer = "container:">
</BuildableReference>
</BuildActionEntry>
</BuildActionEntries>
</BuildAction>
<TestAction
Expand All @@ -30,10 +58,22 @@
shouldUseLaunchSchemeArgsEnv = "YES">
<TestPlans>
<TestPlanReference
reference = "container:.swiftpm/WireAnalytics.xctestplan"
reference = "container:Tests/TestPlans/AllTests.xctestplan"
default = "YES">
</TestPlanReference>
</TestPlans>
<Testables>
<TestableReference
skipped = "NO">
<BuildableReference
BuildableIdentifier = "primary"
BlueprintIdentifier = "WireAnalyticsTests"
BuildableName = "WireAnalyticsTests"
BlueprintName = "WireAnalyticsTests"
ReferencedContainer = "container:">
</BuildableReference>
</TestableReference>
</Testables>
</TestAction>
<LaunchAction
buildConfiguration = "Debug"
Expand Down
Loading
Loading