Skip to content
This repository was archived by the owner on Nov 12, 2025. It is now read-only.

Commit 8f830b4

Browse files
authored
Merge pull request #12 from scorebet/connect-0.47.1
Update fork to 0.47.1
2 parents 5502533 + d6f4101 commit 8f830b4

684 files changed

Lines changed: 80015 additions & 59528 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: 103 additions & 104 deletions
Original file line numberDiff line numberDiff line change
@@ -3,40 +3,38 @@ version: 2.1
33
parameters:
44
xcode_version:
55
type: string
6-
default: "11.4.0"
6+
default: "12.5.1"
77
ios_current_version:
88
type: string
9-
default: "13.4"
9+
default: "14.5"
1010
ios_previous_version:
1111
type: string
12-
default: "12.4"
12+
default: "13.7"
1313
ios_sdk:
1414
type: string
15-
default: "iphonesimulator13.4"
15+
default: "iphonesimulator14.5"
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.3"
2222
tvos_version: # The user-facing version string of tvOS builds
2323
type: string
24-
default: "13.4"
24+
default: "14.5"
2525
tvos_sdk:
2626
type: string
27-
default: "appletvsimulator13.4"
27+
default: "appletvsimulator14.5"
2828

2929
commands:
30-
common_test_steps:
31-
description: Commands to run for every set of tests
30+
integration_test_setup:
3231
steps:
3332
- restore_cache:
3433
key: starwars-server
35-
- checkout
34+
- common_test_setup
3635
- run:
37-
name: "Pull Submodules"
38-
command: |
39-
git submodule update --init
36+
command: ./scripts/install-node.sh
37+
name: Install Node
4038
- run:
4139
command: ./scripts/install-or-update-starwars-server.sh
4240
name: Install/Update StarWars Server
@@ -45,129 +43,144 @@ commands:
4543
name: Start StarWars Server
4644
background: true
4745
- run:
48-
command: xcodebuild clean build build-for-testing -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" | xcpretty
49-
name: Clean and build for testing
46+
command: cd SimpleUploadServer && npm install && npm start
47+
name: Start Upload Server
48+
background: true
5049
- run:
51-
command: xcodebuild test-without-building -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" | xcpretty
52-
name: Run tests
50+
command: sudo chmod -R +rwx SimpleUploadServer
51+
name: Adjust permissions for simple upload server folder
52+
integration_test_cleanup:
53+
steps:
5354
- save_cache:
5455
key: starwars-server
5556
paths:
5657
- ../starwars-server
57-
58+
common_test_setup:
59+
description: Commands to run for setup of every set of tests
60+
steps:
61+
- checkout
62+
- run:
63+
command: rm ~/.ssh/id_rsa
64+
name: Remove old SSH key
65+
- run:
66+
command: for ip in $(dig @8.8.8.8 bitbucket.org +short); do ssh-keyscan bitbucket.org,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
67+
name: Bitbucket Key Workaround
68+
- run:
69+
command: for ip in $(dig @8.8.8.8 github.com +short); do ssh-keyscan github.com,$ip; ssh-keyscan $ip; done 2>/dev/null >> ~/.ssh/known_hosts || true
70+
name: Github Key Workaround
71+
build_and_run_tests:
72+
steps:
73+
- run:
74+
command: xcodebuild clean build build-for-testing -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" -testPlan "${CIRCLE_XCODE_TEST_PLAN}" | xcpretty
75+
name: Clean and build for testing
76+
- run:
77+
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
78+
name: Run tests
79+
- save-xcodebuild-artifacts
80+
save-xcodebuild-artifacts:
81+
description: Save artifacts logs, crash reports and test results generated by xcodebuild
82+
steps:
83+
- store_artifacts:
84+
name: Save xcodebuild logs
85+
path: logs
86+
destination: logs
87+
- store_artifacts:
88+
name: Save crash logs
89+
path: ~/Library/Logs/DiagnosticReports/
90+
destination: crashes
91+
- run:
92+
name: Zip result bundle
93+
working_directory: ~/TestResults
94+
command: zip -r ResultBundle.zip ResultBundle.xcresult
95+
when: always
96+
- store_artifacts:
97+
name: Save test results
98+
path: ~/TestResults/ResultBundle.zip
99+
destination: results
58100

59101
# Important! When adding a new job to `jobs`, make sure to define when it
60102
# executes by also adding it to the `workflows` section below!
61103
jobs:
62-
macOS_current:
63-
macos:
64-
xcode: << pipeline.parameters.xcode_version >>
65-
environment:
66-
DESTINATION: platform=macOS,arch=x86_64
67-
CIRCLE_XCODE_SCHEME: Apollo
68-
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
69-
steps:
70-
- common_test_steps
71-
72-
iOS_current:
104+
Swift_Build:
73105
macos:
74106
xcode: << pipeline.parameters.xcode_version >>
75-
environment:
76-
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11
77-
CIRCLE_XCODE_SCHEME: Apollo
78-
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
79107
steps:
80-
- common_test_steps
81-
82-
iOS_previous:
83-
macos:
84-
xcode: << pipeline.parameters.xcode_version >>
85-
environment:
86-
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone Xs
87-
CIRCLE_XCODE_SCHEME: Apollo
88-
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
89-
steps:
90-
- common_test_steps
108+
- common_test_setup
109+
- run:
110+
command: swift build
91111

92-
tvOS_current:
112+
IntegrationTests_macOS_current:
93113
macos:
94114
xcode: << pipeline.parameters.xcode_version >>
95115
environment:
96-
DESTINATION: platform=tvOS Simulator,OS=<< pipeline.parameters.tvos_version >>,name=Apple TV
116+
DESTINATION: platform=macOS,arch=x86_64
97117
CIRCLE_XCODE_SCHEME: Apollo
98-
CIRCLE_XCODE_SDK: << pipeline.parameters.tvos_sdk >>
118+
CIRCLE_XCODE_TEST_PLAN: Apollo-IntegrationTestPlan
119+
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
99120
steps:
100-
- common_test_steps
121+
- integration_test_setup
122+
- build_and_run_tests
123+
- integration_test_cleanup
101124

102-
SQLitemacOS_current:
125+
macOS_current:
103126
macos:
104127
xcode: << pipeline.parameters.xcode_version >>
105128
environment:
106129
DESTINATION: platform=macOS,arch=x86_64
107-
CIRCLE_XCODE_SCHEME: ApolloSQLite
130+
CIRCLE_XCODE_SCHEME: Apollo
131+
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
108132
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
109133
steps:
110-
- common_test_steps
134+
- common_test_setup
135+
- build_and_run_tests
111136

112-
SQLiteiOS_current:
137+
iOS_current:
113138
macos:
114139
xcode: << pipeline.parameters.xcode_version >>
115140
environment:
116141
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11
117-
CIRCLE_XCODE_SCHEME: ApolloSQLite
118-
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
119-
steps:
120-
- common_test_steps
121-
122-
SQLiteiOS_previous:
123-
macos:
124-
xcode: << pipeline.parameters.xcode_version >>
125-
environment:
126-
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone Xs
127-
CIRCLE_XCODE_SCHEME: ApolloSQLite
142+
CIRCLE_XCODE_SCHEME: Apollo
143+
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
128144
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
129145
steps:
130-
- common_test_steps
131-
132-
WebSocketmacOS_current:
133-
macos:
134-
xcode: << pipeline.parameters.xcode_version >>
135-
environment:
136-
DESTINATION: platform=macOS,arch=x86_64
137-
CIRCLE_XCODE_SCHEME: ApolloWebSocket
138-
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
139-
steps:
140-
- common_test_steps
146+
- common_test_setup
147+
- build_and_run_tests
141148

142-
WebSocketiOS_current:
149+
iOS_previous:
143150
macos:
144151
xcode: << pipeline.parameters.xcode_version >>
145152
environment:
146-
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11
147-
CIRCLE_XCODE_SCHEME: ApolloWebSocket
153+
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 11
154+
CIRCLE_XCODE_SCHEME: Apollo
155+
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
148156
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
149157
steps:
150-
- common_test_steps
158+
- common_test_setup
159+
- build_and_run_tests
151160

152-
WebSocketiOS_previous:
161+
tvOS_current:
153162
macos:
154163
xcode: << pipeline.parameters.xcode_version >>
155164
environment:
156-
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone Xs
157-
CIRCLE_XCODE_SCHEME: ApolloWebSocket
158-
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
165+
DESTINATION: platform=tvOS Simulator,OS=<< pipeline.parameters.tvos_version >>,name=Apple TV
166+
CIRCLE_XCODE_SCHEME: Apollo
167+
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
168+
CIRCLE_XCODE_SDK: << pipeline.parameters.tvos_sdk >>
159169
steps:
160-
- common_test_steps
170+
- common_test_setup
171+
- build_and_run_tests
161172

162-
CodegenLibmacOS_current:
173+
CodegenLib_macOS_current:
163174
macos:
164175
xcode: << pipeline.parameters.xcode_version >>
165176
environment:
166177
DESTINATION: platform=macOS,arch=x86_64
167178
CIRCLE_XCODE_SCHEME: ApolloCodegenLib
179+
CIRCLE_XCODE_TEST_PLAN: Apollo-CodegenTestPlan
168180
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
169181
steps:
170-
- common_test_steps
182+
- common_test_setup
183+
- build_and_run_tests
171184

172185
CocoaPodsTrunk:
173186
macos:
@@ -185,6 +198,10 @@ workflows:
185198
# This workflow builds and tests the library across various operating systems and versions
186199
build-and-test:
187200
jobs:
201+
- Swift_Build:
202+
name: Build with SPM
203+
- IntegrationTests_macOS_current:
204+
name: Apollo Integration Tests macOS << pipeline.parameters.macos_version >>
188205
- macOS_current:
189206
name: Apollo macOS << pipeline.parameters.macos_version >>
190207
- iOS_current:
@@ -193,19 +210,7 @@ workflows:
193210
name: Apollo iOS << pipeline.parameters.ios_previous_version >>
194211
- tvOS_current:
195212
name: Apollo tvOS << pipeline.parameters.tvos_version >>
196-
- SQLitemacOS_current:
197-
name: ApolloSQLite macOS << pipeline.parameters.macos_version >>
198-
- SQLiteiOS_current:
199-
name: ApolloSQLite iOS << pipeline.parameters.ios_current_version >>
200-
- SQLiteiOS_previous:
201-
name: ApolloSQLite iOS << pipeline.parameters.ios_previous_version >>
202-
- WebSocketmacOS_current:
203-
name: ApolloWebSocket macOS << pipeline.parameters.macos_version >>
204-
- WebSocketiOS_current:
205-
name: ApolloWebSocket iOS << pipeline.parameters.ios_current_version >>
206-
- WebSocketiOS_previous:
207-
name: ApolloWebSocket iOS << pipeline.parameters.ios_previous_version >>
208-
- CodegenLibmacOS_current:
213+
- CodegenLib_macOS_current:
209214
name: Swift Code Generation
210215
- CocoaPodsTrunk:
211216
name: Push Podspec to CocoaPods Trunk
@@ -214,12 +219,6 @@ workflows:
214219
- Apollo iOS << pipeline.parameters.ios_current_version >>
215220
- Apollo iOS << pipeline.parameters.ios_previous_version >>
216221
- Apollo tvOS << pipeline.parameters.tvos_version >>
217-
- ApolloSQLite macOS << pipeline.parameters.macos_version >>
218-
- ApolloSQLite iOS << pipeline.parameters.ios_current_version >>
219-
- ApolloSQLite iOS << pipeline.parameters.ios_previous_version >>
220-
- ApolloWebSocket macOS << pipeline.parameters.macos_version >>
221-
- ApolloWebSocket iOS << pipeline.parameters.ios_current_version >>
222-
- ApolloWebSocket iOS << pipeline.parameters.ios_previous_version >>
223222
- Swift Code Generation
224223
filters:
225224
# Only build semver tags
Lines changed: 25 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,25 @@
1+
---
2+
name: Bug report
3+
about: Use this template for submitting bug reports.
4+
---
5+
6+
## Bug report
7+
8+
Please replace this line with a short description of the problem. Make sure you've read `CHANGELOG.md` in the root of the repo to make sure a new version hasn't already addressed your problem!
9+
10+
## Versions
11+
12+
Please fill in the versions you're currently using:
13+
14+
- `apollo-ios` SDK version:
15+
- Xcode version:
16+
- Swift version:
17+
- Package manager:
18+
19+
## Steps to reproduce
20+
21+
Please replace this line with steps to reproduce the problem.
22+
23+
## Further details
24+
25+
Please replace this line with any further details or context necessary to understand the problem. Delete this section if you don't have anything further to add.
Lines changed: 21 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,21 @@
1+
---
2+
name: Feature request
3+
about: Use this template for requesting new features or significant changes to existing features.
4+
---
5+
6+
7+
## Feature request
8+
9+
Please replace this line with a short description of the feature you're requesting.
10+
11+
## Motivation
12+
13+
Please replace this line with an explanation for why you would like this feature added.
14+
15+
## Proposed solution
16+
17+
Please replace this line with any proposed solution you have already started to work on. Delete this section if you don't have a proposed solution.
18+
19+
## Outstanding Questions
20+
21+
Please replace this line with any known question marks around how your feature would work. Delete this section if you don't have any outstanding questions.
Lines changed: 20 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
---
2+
name: Question
3+
about: Please don't use issues to ask questions, use our forums instead.
4+
labels: question
5+
---
6+
7+
8+
## Question
9+
10+
Before you ask, check a few things to see if there might already be an answer:
11+
12+
- [`CHANGELOG.md`](https://github.com/apollographql/apollo-ios/blob/main/CHANGELOG.md) has all the most recent changes
13+
- We have [extensive documentation available](https://www.apollographql.com/docs/ios) (though we're always looking for ways to improve it!)
14+
15+
16+
If neither of those have an answer for you, we have [community forums](https://community.apollographql.com) where our users can ask and answer questions - head on over there rather than opening an issue here please!
17+
18+
## Seriously
19+
20+
Use the [community forums](https://community.apollographql.com) for questions, please! 😇

.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)