Skip to content

Commit

Permalink
Merge branch 'main' into connect-0.46.0
Browse files Browse the repository at this point in the history
* main: (856 commits)
  Add execution tests for ApolloClient clearCache callback queue (apollographql#1901)
  Use the provided callback queue instead of the store's default. (apollographql#1904)
  chore(deps): update dependency path-parse to 1.0.7 [security] (apollographql#1899)
  Release - 0.46.0 (apollographql#1897)
  Update subscriptions tutorial to be compatible with recent changes (apollographql#1893)
  Add docs and improve merging of records from WebSockets into cache. (apollographql#1892)
  Publish response from the `WebSocketTransport` to the `ApolloStore` (apollographql#1889)
  fix(deps): update dependency gatsby-theme-apollo-docs to v4.7.14
  Removing Swift codegen (v1) (apollographql#1873)
  Update toolchain versions used by circleci (apollographql#1875)
  fix(deps): update dependency gatsby-theme-apollo-docs to v4.7.13
  Community Updates - ROADMAP/README (apollographql#1867)
  [Release] - 0.45.0 (apollographql#1862)
  WebSocket Fixes - Revert to Starscream 3.x and invert dependency (apollographql#1861)
  Docs/discussions_2_community branch changes (apollographql#1858)
  Replace spectrum with Discourse (apollographql#1857)
  fix(deps): update dependency gatsby-theme-apollo-docs to v4.7.12
  Configure Renovate (apollographql#1854)
  Revert "Reconfiguring renovate 2/2"
  Reconfiguring renovate 2/2
  ...

# Conflicts:
#	Sources/Apollo/GraphQLQueryWatcher.swift
#	Sources/ApolloWebSocket/WebSocketTransport.swift
  • Loading branch information
ketenshi committed Aug 16, 2021
2 parents 5502533 + b6bfea0 commit d164ab1
Show file tree
Hide file tree
Showing 679 changed files with 78,369 additions and 59,482 deletions.
207 changes: 103 additions & 104 deletions .circleci/config.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,40 +3,38 @@ version: 2.1
parameters:
xcode_version:
type: string
default: "11.4.0"
default: "12.5.1"
ios_current_version:
type: string
default: "13.4"
default: "14.5"
ios_previous_version:
type: string
default: "12.4"
default: "13.7"
ios_sdk:
type: string
default: "iphonesimulator13.4"
default: "iphonesimulator14.5"
macos_version: # The user-facing version string for macOS builds
type: string
default: "10.15"
macos_sdk: # The full SDK string to use for macOS builds
type: string
default: "macosx10.15"
default: "macosx11.3"
tvos_version: # The user-facing version string of tvOS builds
type: string
default: "13.4"
default: "14.5"
tvos_sdk:
type: string
default: "appletvsimulator13.4"
default: "appletvsimulator14.5"

commands:
common_test_steps:
description: Commands to run for every set of tests
integration_test_setup:
steps:
- restore_cache:
key: starwars-server
- checkout
- common_test_setup
- run:
name: "Pull Submodules"
command: |
git submodule update --init
command: ./scripts/install-node.sh
name: Install Node
- run:
command: ./scripts/install-or-update-starwars-server.sh
name: Install/Update StarWars Server
Expand All @@ -45,129 +43,144 @@ commands:
name: Start StarWars Server
background: true
- run:
command: xcodebuild clean build build-for-testing -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" | xcpretty
name: Clean and build for testing
command: cd SimpleUploadServer && npm install && npm start
name: Start Upload Server
background: true
- run:
command: xcodebuild test-without-building -project "Apollo.xcodeproj" -scheme "${CIRCLE_XCODE_SCHEME}" -sdk "${CIRCLE_XCODE_SDK}" -destination "${DESTINATION}" | xcpretty
name: Run tests
command: sudo chmod -R +rwx SimpleUploadServer
name: Adjust permissions for simple upload server folder
integration_test_cleanup:
steps:
- save_cache:
key: starwars-server
paths:
- ../starwars-server

common_test_setup:
description: Commands to run for setup of every set of tests
steps:
- checkout
- run:
command: rm ~/.ssh/id_rsa
name: Remove old SSH key
- run:
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
name: Bitbucket Key Workaround
- run:
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
name: Github Key Workaround
build_and_run_tests:
steps:
- run:
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
name: Clean and build for testing
- run:
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
name: Run tests
- save-xcodebuild-artifacts
save-xcodebuild-artifacts:
description: Save artifacts logs, crash reports and test results generated by xcodebuild
steps:
- store_artifacts:
name: Save xcodebuild logs
path: logs
destination: logs
- store_artifacts:
name: Save crash logs
path: ~/Library/Logs/DiagnosticReports/
destination: crashes
- run:
name: Zip result bundle
working_directory: ~/TestResults
command: zip -r ResultBundle.zip ResultBundle.xcresult
when: always
- store_artifacts:
name: Save test results
path: ~/TestResults/ResultBundle.zip
destination: results

# Important! When adding a new job to `jobs`, make sure to define when it
# executes by also adding it to the `workflows` section below!
jobs:
macOS_current:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=macOS,arch=x86_64
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
steps:
- common_test_steps

iOS_current:
Swift_Build:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
steps:
- common_test_steps

iOS_previous:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone Xs
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
steps:
- common_test_steps
- common_test_setup
- run:
command: swift build

tvOS_current:
IntegrationTests_macOS_current:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=tvOS Simulator,OS=<< pipeline.parameters.tvos_version >>,name=Apple TV
DESTINATION: platform=macOS,arch=x86_64
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_SDK: << pipeline.parameters.tvos_sdk >>
CIRCLE_XCODE_TEST_PLAN: Apollo-IntegrationTestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
steps:
- common_test_steps
- integration_test_setup
- build_and_run_tests
- integration_test_cleanup

SQLitemacOS_current:
macOS_current:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=macOS,arch=x86_64
CIRCLE_XCODE_SCHEME: ApolloSQLite
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
steps:
- common_test_steps
- common_test_setup
- build_and_run_tests

SQLiteiOS_current:
iOS_current:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11
CIRCLE_XCODE_SCHEME: ApolloSQLite
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
steps:
- common_test_steps

SQLiteiOS_previous:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone Xs
CIRCLE_XCODE_SCHEME: ApolloSQLite
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
steps:
- common_test_steps

WebSocketmacOS_current:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=macOS,arch=x86_64
CIRCLE_XCODE_SCHEME: ApolloWebSocket
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
steps:
- common_test_steps
- common_test_setup
- build_and_run_tests

WebSocketiOS_current:
iOS_previous:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_current_version >>,name=iPhone 11
CIRCLE_XCODE_SCHEME: ApolloWebSocket
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone 11
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
steps:
- common_test_steps
- common_test_setup
- build_and_run_tests

WebSocketiOS_previous:
tvOS_current:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=iOS Simulator,OS=<< pipeline.parameters.ios_previous_version >>,name=iPhone Xs
CIRCLE_XCODE_SCHEME: ApolloWebSocket
CIRCLE_XCODE_SDK: << pipeline.parameters.ios_sdk >>
DESTINATION: platform=tvOS Simulator,OS=<< pipeline.parameters.tvos_version >>,name=Apple TV
CIRCLE_XCODE_SCHEME: Apollo
CIRCLE_XCODE_TEST_PLAN: Apollo-CITestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.tvos_sdk >>
steps:
- common_test_steps
- common_test_setup
- build_and_run_tests

CodegenLibmacOS_current:
CodegenLib_macOS_current:
macos:
xcode: << pipeline.parameters.xcode_version >>
environment:
DESTINATION: platform=macOS,arch=x86_64
CIRCLE_XCODE_SCHEME: ApolloCodegenLib
CIRCLE_XCODE_TEST_PLAN: Apollo-CodegenTestPlan
CIRCLE_XCODE_SDK: << pipeline.parameters.macos_sdk >>
steps:
- common_test_steps
- common_test_setup
- build_and_run_tests

CocoaPodsTrunk:
macos:
Expand All @@ -185,6 +198,10 @@ workflows:
# This workflow builds and tests the library across various operating systems and versions
build-and-test:
jobs:
- Swift_Build:
name: Build with SPM
- IntegrationTests_macOS_current:
name: Apollo Integration Tests macOS << pipeline.parameters.macos_version >>
- macOS_current:
name: Apollo macOS << pipeline.parameters.macos_version >>
- iOS_current:
Expand All @@ -193,19 +210,7 @@ workflows:
name: Apollo iOS << pipeline.parameters.ios_previous_version >>
- tvOS_current:
name: Apollo tvOS << pipeline.parameters.tvos_version >>
- SQLitemacOS_current:
name: ApolloSQLite macOS << pipeline.parameters.macos_version >>
- SQLiteiOS_current:
name: ApolloSQLite iOS << pipeline.parameters.ios_current_version >>
- SQLiteiOS_previous:
name: ApolloSQLite iOS << pipeline.parameters.ios_previous_version >>
- WebSocketmacOS_current:
name: ApolloWebSocket macOS << pipeline.parameters.macos_version >>
- WebSocketiOS_current:
name: ApolloWebSocket iOS << pipeline.parameters.ios_current_version >>
- WebSocketiOS_previous:
name: ApolloWebSocket iOS << pipeline.parameters.ios_previous_version >>
- CodegenLibmacOS_current:
- CodegenLib_macOS_current:
name: Swift Code Generation
- CocoaPodsTrunk:
name: Push Podspec to CocoaPods Trunk
Expand All @@ -214,12 +219,6 @@ workflows:
- Apollo iOS << pipeline.parameters.ios_current_version >>
- Apollo iOS << pipeline.parameters.ios_previous_version >>
- Apollo tvOS << pipeline.parameters.tvos_version >>
- ApolloSQLite macOS << pipeline.parameters.macos_version >>
- ApolloSQLite iOS << pipeline.parameters.ios_current_version >>
- ApolloSQLite iOS << pipeline.parameters.ios_previous_version >>
- ApolloWebSocket macOS << pipeline.parameters.macos_version >>
- ApolloWebSocket iOS << pipeline.parameters.ios_current_version >>
- ApolloWebSocket iOS << pipeline.parameters.ios_previous_version >>
- Swift Code Generation
filters:
# Only build semver tags
Expand Down
25 changes: 25 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-template-bug.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,25 @@
---
name: Bug report
about: Use this template for submitting bug reports.
---

## Bug report

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!

## Versions

Please fill in the versions you're currently using:

- `apollo-ios` SDK version:
- Xcode version:
- Swift version:
- Package manager:

## Steps to reproduce

Please replace this line with steps to reproduce the problem.

## Further details

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.
21 changes: 21 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-template-feature-request.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,21 @@
---
name: Feature request
about: Use this template for requesting new features or significant changes to existing features.
---


## Feature request

Please replace this line with a short description of the feature you're requesting.

## Motivation

Please replace this line with an explanation for why you would like this feature added.

## Proposed solution

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.

## Outstanding Questions

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.
20 changes: 20 additions & 0 deletions .github/ISSUE_TEMPLATE/issue-template-question.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
---
name: Question
about: Please don't use issues to ask questions, use our forums instead.
labels: question
---


## Question

Before you ask, check a few things to see if there might already be an answer:

- [`CHANGELOG.md`](https://github.com/apollographql/apollo-ios/blob/main/CHANGELOG.md) has all the most recent changes
- We have [extensive documentation available](https://www.apollographql.com/docs/ios) (though we're always looking for ways to improve it!)


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!

## Seriously

Use the [community forums](https://community.apollographql.com) for questions, please! 😇
1 change: 1 addition & 0 deletions .gitignore
Original file line number Diff line number Diff line change
Expand Up @@ -58,3 +58,4 @@ scripts/apollo.tar.gz
SwiftScripts/ApolloCLI
Tests/ApolloCodegenTests/scripts
Tests/ApolloCodegenTests/scripts directory
SwiftScripts/.build-**
Loading

0 comments on commit d164ab1

Please sign in to comment.