Skip to content

Commit 7afcfc3

Browse files
Test Target Reconfiguration (#1745)
* Remove test targets from Package.swift * Create ServerIntegrationTest Target and add LegacyInterceptorProviderIntegrationTests WIP on UnitTestPlan * Refactor LegacyInterceptorProviderTests to unit tests and move them out of RequestChainTests * Move StarWarsServer Tests into integration test target * Moved all server dependent tests out of unit tests. Consolidated unit test targets * Convert schemes to use test plans * Reconfigure CircleCI config * minor fix for CircleCI config * Fixes for broken test imports * Fixed test targets to use MacOS 10.15 * Fix SwiftScripts builds * Typo in CircleCI config * Minor fixes * Fix circle CI * Bump CircleCI to use Xcode 12.4 (from 12.1) * Fix simulator versions for CircleCI * Fix macOS SDK version for CircleCI * Attempt to fix macos sdk on circleCI * Remove xcpretty for debugging CircleCI * More fixes for sdk versions * update tvOS version on circle * Add log to try to figure out what on earth is going on with the SHASUM * Fix linker issues with ApolloCodegenTests * Use an NSDIstributedLock to lock the CLI folder while downloading, extracting, and checking SHASUM * Use “.lock” on path for NSDistributedLock * Atomically write SHASUM to extracted zip * Try logging * Attempt changing permissions for extracted CLI folder * test not breaking lock * Removed added logging and cleaned up lock code Co-authored-by: Ellen Shapiro <designatednerd@gmail.com>
1 parent ed93b8e commit 7afcfc3

70 files changed

Lines changed: 1310 additions & 1596 deletions

File tree

Some content is hidden

Large Commits have some content hidden by default. Use the searchbox below for content that may be hidden.

.circleci/config.yml

Lines changed: 13 additions & 86 deletions
Original file line numberDiff line numberDiff line change
@@ -3,28 +3,28 @@ version: 2.1
33
parameters:
44
xcode_version:
55
type: string
6-
default: "12.1.0"
6+
default: "12.4.0"
77
ios_current_version:
88
type: string
9-
default: "14.1"
9+
default: "14.4"
1010
ios_previous_version:
1111
type: string
12-
default: "13.5"
12+
default: "13.7"
1313
ios_sdk:
1414
type: string
15-
default: "iphonesimulator14.1"
15+
default: "iphonesimulator14.4"
1616
macos_version: # The user-facing version string for macOS builds
1717
type: string
1818
default: "10.15"
1919
macos_sdk: # The full SDK string to use for macOS builds
2020
type: string
21-
default: "macosx10.15"
21+
default: "macosx11.1"
2222
tvos_version: # The user-facing version string of tvOS builds
2323
type: string
24-
default: "14.0"
24+
default: "14.3"
2525
tvos_sdk:
2626
type: string
27-
default: "appletvsimulator14.0"
27+
default: "appletvsimulator14.3"
2828

2929
commands:
3030
common_test_steps:
@@ -63,7 +63,7 @@ commands:
6363
command: xcodebuild clean build build-for-testing -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" | xcpretty
6464
name: Clean and build for testing
6565
- run:
66-
command: xcodebuild test-without-building -resultBundlePath ~/TestResults/ResultBundle.xcresult -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" | xcpretty
66+
command: xcodebuild test-without-building -resultBundlePath ~/TestResults/ResultBundle.xcresult -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" -testPlan "${CIRCLE_XCODE_TEST_PLAN}" | xcpretty
6767
name: Run tests
6868
- save-xcodebuild-artifacts
6969
- save_cache:
@@ -100,6 +100,7 @@ jobs:
100100
environment:
101101
DESTINATION: platform=macOS,arch=x86_64
102102
CIRCLE_XCODE_SCHEME: Apollo
103+
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
103104
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
104105
steps:
105106
- common_test_steps
@@ -110,6 +111,7 @@ jobs:
110111
environment:
111112
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11
112113
CIRCLE_XCODE_SCHEME: Apollo
114+
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
113115
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
114116
steps:
115117
- common_test_steps
@@ -120,6 +122,7 @@ jobs:
120122
environment:
121123
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 11
122124
CIRCLE_XCODE_SCHEME: Apollo
125+
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
123126
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
124127
steps:
125128
- common_test_steps
@@ -130,76 +133,18 @@ jobs:
130133
environment:
131134
DESTINATION: platform=tvOS Simulator,OS=<< pipeline.parameters.tvos_version >>,name=Apple TV
132135
CIRCLE_XCODE_SCHEME: Apollo
136+
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
133137
CIRCLE_XCODE_SDK: << pipeline.parameters.tvos_sdk >>
134138
steps:
135139
- common_test_steps
136140

137-
SQLitemacOS_current:
138-
macos:
139-
xcode: << pipeline.parameters.xcode_version >>
140-
environment:
141-
DESTINATION: platform=macOS,arch=x86_64
142-
CIRCLE_XCODE_SCHEME: ApolloSQLite
143-
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
144-
steps:
145-
- common_test_steps
146-
147-
SQLiteiOS_current:
148-
macos:
149-
xcode: << pipeline.parameters.xcode_version >>
150-
environment:
151-
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11
152-
CIRCLE_XCODE_SCHEME: ApolloSQLite
153-
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
154-
steps:
155-
- common_test_steps
156-
157-
SQLiteiOS_previous:
158-
macos:
159-
xcode: << pipeline.parameters.xcode_version >>
160-
environment:
161-
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 11
162-
CIRCLE_XCODE_SCHEME: ApolloSQLite
163-
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
164-
steps:
165-
- common_test_steps
166-
167-
WebSocketmacOS_current:
168-
macos:
169-
xcode: << pipeline.parameters.xcode_version >>
170-
environment:
171-
DESTINATION: platform=macOS,arch=x86_64
172-
CIRCLE_XCODE_SCHEME: ApolloWebSocket
173-
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
174-
steps:
175-
- common_test_steps
176-
177-
WebSocketiOS_current:
178-
macos:
179-
xcode: << pipeline.parameters.xcode_version >>
180-
environment:
181-
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11
182-
CIRCLE_XCODE_SCHEME: ApolloWebSocket
183-
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
184-
steps:
185-
- common_test_steps
186-
187-
WebSocketiOS_previous:
188-
macos:
189-
xcode: << pipeline.parameters.xcode_version >>
190-
environment:
191-
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 11
192-
CIRCLE_XCODE_SCHEME: ApolloWebSocket
193-
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
194-
steps:
195-
- common_test_steps
196-
197141
CodegenLibmacOS_current:
198142
macos:
199143
xcode: << pipeline.parameters.xcode_version >>
200144
environment:
201145
DESTINATION: platform=macOS,arch=x86_64
202146
CIRCLE_XCODE_SCHEME: ApolloCodegenLib
147+
CIRCLE_XCODE_TEST_PLAN: Apollo-CodegenTestPlan
203148
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
204149
steps:
205150
- common_test_steps
@@ -228,18 +173,6 @@ workflows:
228173
name: Apollo iOS << pipeline.parameters.ios_previous_version >>
229174
- tvOS_current:
230175
name: Apollo tvOS << pipeline.parameters.tvos_version >>
231-
- SQLitemacOS_current:
232-
name: ApolloSQLite macOS << pipeline.parameters.macos_version >>
233-
- SQLiteiOS_current:
234-
name: ApolloSQLite iOS << pipeline.parameters.ios_current_version >>
235-
- SQLiteiOS_previous:
236-
name: ApolloSQLite iOS << pipeline.parameters.ios_previous_version >>
237-
- WebSocketmacOS_current:
238-
name: ApolloWebSocket macOS << pipeline.parameters.macos_version >>
239-
- WebSocketiOS_current:
240-
name: ApolloWebSocket iOS << pipeline.parameters.ios_current_version >>
241-
- WebSocketiOS_previous:
242-
name: ApolloWebSocket iOS << pipeline.parameters.ios_previous_version >>
243176
- CodegenLibmacOS_current:
244177
name: Swift Code Generation
245178
- CocoaPodsTrunk:
@@ -249,12 +182,6 @@ workflows:
249182
- Apollo iOS << pipeline.parameters.ios_current_version >>
250183
- Apollo iOS << pipeline.parameters.ios_previous_version >>
251184
- Apollo tvOS << pipeline.parameters.tvos_version >>
252-
- ApolloSQLite macOS << pipeline.parameters.macos_version >>
253-
- ApolloSQLite iOS << pipeline.parameters.ios_current_version >>
254-
- ApolloSQLite iOS << pipeline.parameters.ios_previous_version >>
255-
- ApolloWebSocket macOS << pipeline.parameters.macos_version >>
256-
- ApolloWebSocket iOS << pipeline.parameters.ios_current_version >>
257-
- ApolloWebSocket iOS << pipeline.parameters.ios_previous_version >>
258185
- Swift Code Generation
259186
filters:
260187
# Only build semver tags

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -58,3 +58,4 @@ scripts/apollo.tar.gz
5858
SwiftScripts/ApolloCLI
5959
Tests/ApolloCodegenTests/scripts
6060
Tests/ApolloCodegenTests/scripts directory
61+
SwiftScripts/.build-**

0 commit comments

Comments
 (0)