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

Field Merging [3/x] Implement in SelectionSetTemplate #318

Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
153 commits
Select commit Hold shift + click to select a range
9410d46
chore(deps): update dependency rollup to v4.17.2 (apollographql/apoll…
svc-secops May 7, 2024
df4667b
split: apollo-ios - PR #352 - chore(deps): update dependency rollup t…
May 7, 2024
aa353e0
Squashed 'apollo-ios/' changes from d1d37bf6..8f26d38e
May 7, 2024
b36347c
split: apollo-ios-codegen - PR #352 - chore(deps): update dependency …
May 7, 2024
bb0d88b
Squashed 'apollo-ios-codegen/' changes from b77da342..de2b59cc
May 7, 2024
ec3a037
Generate nil default value for input field w/default value in schema …
AnthonyMDev May 14, 2024
15e6189
split: apollo-ios-codegen - PR #358 - Generate nil default value for …
May 14, 2024
d7208e2
Squashed 'apollo-ios-codegen/' changes from de2b59cc..a491080f
May 14, 2024
fe518ec
Update ROADMAP.md
AnthonyMDev May 14, 2024
a668ecf
Namespace ApolloAPI in InterfaceTemplate (apollographql/apollo-ios-de…
AnthonyMDev May 14, 2024
fb67a08
Squashed 'apollo-ios/' changes from 8f26d38e..23c36434
May 14, 2024
fb6c29e
split: apollo-ios - PR #359 - Namespace ApolloAPI in InterfaceTemplate
May 14, 2024
557a6c2
split: apollo-ios-codegen - PR #359 - Namespace ApolloAPI in Interfac…
May 14, 2024
fa98a8c
Squashed 'apollo-ios-codegen/' changes from a491080f..e26c27b1
May 14, 2024
344a7df
Release 1.11.0 (apollographql/apollo-ios-dev#360)
AnthonyMDev May 15, 2024
3b5a645
split: apollo-ios - PR #360 - Release 1.11.0
May 15, 2024
ffeaca7
Squashed 'apollo-ios/' changes from 23c36434..fe7763be
May 15, 2024
1c6e097
Squashed 'apollo-ios-codegen/' changes from e26c27b1..5bf96fd4
May 15, 2024
ac89518
split: apollo-ios-codegen - PR #360 - Release 1.11.0
May 15, 2024
80e4a4f
Attach cli to release
AnthonyMDev May 15, 2024
554db0f
chore: Update deprecated property references (apollographql/apollo-i…
calvincestari May 16, 2024
282cea6
pull: apollo-ios - PR #361 - chore: Update deprecated property refer…
May 16, 2024
e3c3870
Squashed 'apollo-ios/' changes from fe7763be..8ee96435
May 16, 2024
beff6f3
fix: Adds visionOS deployment to ApolloTestSupport podspec (apollogra…
calvincestari May 20, 2024
daa391a
split: apollo-ios - PR #364 - fix: Adds visionOS deployment to Apollo…
May 20, 2024
5bcdf71
Squashed 'apollo-ios/' changes from 8ee96435..da19e5ed
May 20, 2024
16d8081
Add @_spi(Execution) to executor for import in test mocks (apollograp…
AnthonyMDev May 20, 2024
78c5f55
split: apollo-ios - PR #362 - Add @_spi(Execution) to executor for im…
May 20, 2024
9208938
Squashed 'apollo-ios/' changes from da19e5ed..d502e944
May 20, 2024
ccfb72e
Support ID scalar as a custom scalar (apollographql/apollo-ios-dev#363)
AnthonyMDev May 20, 2024
03734f6
Squashed 'apollo-ios-codegen/' changes from 5bf96fd4..e440cb50
May 20, 2024
8980e29
split: apollo-ios-codegen - PR #363 - Support ID scalar as a custom s…
May 20, 2024
13d219b
release: (apollographql/apollo-ios-dev#365)
calvincestari May 21, 2024
d9d3485
split: apollo-ios - PR #365 - release:
May 21, 2024
1a8f4ac
Squashed 'apollo-ios/' changes from d502e944..e2ef7718
May 21, 2024
20c837b
split: apollo-ios-codegen - PR #365 - release:
May 21, 2024
4a44560
Squashed 'apollo-ios-codegen/' changes from e440cb50..ec097ec7
May 21, 2024
95cda79
release: (apollographql/apollo-ios-dev#366)
calvincestari May 22, 2024
560a98e
split: apollo-ios - PR #366 - release:
May 22, 2024
5d4dac2
Squashed 'apollo-ios/' changes from e2ef7718..f5d918ed
May 22, 2024
5ca37c1
split: apollo-ios-codegen - PR #366 - release:
May 22, 2024
e5918d7
Squashed 'apollo-ios-codegen/' changes from ec097ec7..1d5ae9bf
May 22, 2024
7518a89
release: (apollographql/apollo-ios-dev#367)
calvincestari May 23, 2024
5eeda94
split: apollo-ios - PR #367 - release:
May 23, 2024
3f6162f
Squashed 'apollo-ios/' changes from f5d918ed..99dfbdb8
May 23, 2024
578f961
split: apollo-ios-codegen - PR #367 - release:
May 23, 2024
a4c5e9d
Squashed 'apollo-ios-codegen/' changes from 1d5ae9bf..6e7bd0dd
May 23, 2024
8c01583
ci: Update environment to latest versions (apollographql/apollo-ios-d…
calvincestari May 24, 2024
ad36ad9
Update ROADMAP.md
AnthonyMDev May 28, 2024
81fcf37
Revert integration tests
AnthonyMDev May 31, 2024
53cfcb5
Revert "Revert integration tests"
AnthonyMDev May 31, 2024
e1ee61b
Set integration tests to run on macos-13 (#378)
AnthonyMDev May 31, 2024
1594ccf
Set integration tests to run on macos-13 (apollographql/apollo-ios-de…
ejensen May 31, 2024
f57fa24
split: apollo-ios - PR #378 - Set integration tests to run on macos-13
May 31, 2024
c2974f5
Squashed 'apollo-ios/' changes from 99dfbdb8..522176b7
May 31, 2024
687fc0e
chore(deps): update dependency ts-jest to v29.1.4 (apollographql/apol…
svc-secops Jun 4, 2024
b752d0c
chore(deps): update dependency rollup to v4.18.0 (apollographql/apoll…
svc-secops Jun 4, 2024
9257454
Squashed 'apollo-ios-codegen/' changes from 6e7bd0dd..0f7a439f
Jun 4, 2024
b02b143
pull: apollo-ios-codegen - PR #374 - chore(deps): update dependency r…
Jun 4, 2024
a507b72
Squashed 'apollo-ios-codegen/' changes from 0f7a439f..363f942c
Jun 4, 2024
b39f122
chore(deps): update dependency ts-jest to v29.1.4 (apollographql/apol…
Jun 4, 2024
94be720
Added Existential Any requirement (apollographql/apollo-ios-dev#379)
AnthonyMDev Jun 6, 2024
64a1859
split: apollo-ios - PR #379 - Added Existential Any requirement
Jun 6, 2024
f957243
Squashed 'apollo-ios/' changes from 522176b7..3188d6a6
Jun 6, 2024
40eb7b6
split: apollo-ios-codegen - PR #379 - Added Existential Any requirement
Jun 6, 2024
f7414b4
Squashed 'apollo-ios-codegen/' changes from 363f942c..d48baeb7
Jun 6, 2024
3c10079
split: apollo-ios-pagination - PR #379 - Added Existential Any requir…
Jun 6, 2024
a6bf731
Squashed 'apollo-ios-pagination/' changes from d8ddfdbc..8e073198
Jun 6, 2024
4ef0f28
JSONConverter helper (apollographql/apollo-ios-dev#380)
AnthonyMDev Jun 7, 2024
81adc14
Squashed 'apollo-ios/' changes from 3188d6a6..b52a8610
Jun 7, 2024
6473cf0
split: apollo-ios - PR #380 - JSONConverter helper
Jun 7, 2024
7c91397
chore(deps): update dependency @rollup/plugin-replace to v5.0.7 (apol…
svc-secops Jun 10, 2024
b9ddde9
split: apollo-ios-codegen - PR #382 - chore(deps): update dependency …
Jun 10, 2024
aa75916
Squashed 'apollo-ios-codegen/' changes from d48baeb7..54e956a2
Jun 10, 2024
1395580
Fix building ApolloSQLite with Xcode 16b1 (apollographql/apollo-ios-d…
rastersize Jun 10, 2024
f589733
Squashed 'apollo-ios/' changes from b52a8610..22cc0b64
Jun 10, 2024
a843bd5
split: apollo-ios - PR #386 - Fix building ApolloSQLite with Xcode 16b1
Jun 10, 2024
5bc0a45
chore: Update Swift Collections dependency (apollographql/apollo-ios-…
calvincestari Jun 12, 2024
f05a29f
Feature: Schema Type Renaming (apollographql/apollo-ios-dev#388)
BobaFetters Jun 13, 2024
53ca063
Squashed 'apollo-ios-codegen/' changes from 54e956a2..d4eaa545
Jun 13, 2024
d1e27bc
split: apollo-ios-codegen - PR #388 - Feature: Schema Type Renaming
Jun 13, 2024
8208d15
Update ROADMAP.md (apollographql/apollo-ios-dev#389)
AnthonyMDev Jun 13, 2024
57ef155
split: apollo-ios - PR #389 - Update ROADMAP.md
Jun 13, 2024
56adf80
Squashed 'apollo-ios/' changes from 22cc0b64..19aa89eb
Jun 13, 2024
96f0d1e
Fixing broken integration tests (apollographql/apollo-ios-dev#395)
BobaFetters Jun 18, 2024
d0f8790
cI: Release Automation Step 1 (apollographql/apollo-ios-dev#392)
BobaFetters Jun 18, 2024
ed278c6
ci: Fixing release-check workflow (apollographql/apollo-ios-dev#398)
BobaFetters Jun 24, 2024
ee5e192
chore(deps): update dependency ts-jest to v29.1.5 (apollographql/apol…
svc-secops Jun 24, 2024
3a9a1ce
Squashed 'apollo-ios-codegen/' changes from d4eaa545..f3f8a662
Jun 24, 2024
7aef8e9
split: apollo-ios-codegen - PR #397 - chore(deps): update dependency …
Jun 24, 2024
e7bb581
ci: Setting up release publishing (apollographql/apollo-ios-dev#396)
BobaFetters Jun 24, 2024
2208062
Release 1.13.0 (apollographql/apollo-ios-dev#399)
github-actions[bot] Jun 25, 2024
4a5d77b
split: apollo-ios - PR #399 - Release 1.13.0
Jun 25, 2024
4848515
Squashed 'apollo-ios/' changes from 19aa89eb..8dd101df
Jun 25, 2024
8031c72
split: apollo-ios-codegen - PR #399 - Release 1.13.0
Jun 25, 2024
d8b207c
Squashed 'apollo-ios-codegen/' changes from f3f8a662..a0bb4ed8
Jun 25, 2024
58df941
Tweaking publish release workflow (apollographql/apollo-ios-dev#400)
BobaFetters Jun 25, 2024
db50f1d
Update publish-release.yml
BobaFetters Jun 25, 2024
a0175e0
Update publish-release.yml
BobaFetters Jun 25, 2024
105dce1
Update publish-release.yml
BobaFetters Jun 25, 2024
68d3e44
Update publish-release.yml
BobaFetters Jun 25, 2024
66d4e2b
Update publish-release.yml
BobaFetters Jun 25, 2024
64689de
Update publish-release.yml
BobaFetters Jun 25, 2024
f23ac25
Update ROADMAP.md
AnthonyMDev Jun 25, 2024
8b76611
Fixing integration tests (apollographql/apollo-ios-dev#404)
BobaFetters Jun 26, 2024
9321e76
Squashed 'apollo-ios/' changes from 8dd101df..84196082
Jun 26, 2024
5aebd32
split: apollo-ios - PR #404 - Fixing integration tests
Jun 26, 2024
6bb1f65
chore(deps): update dependency typescript to v5.5.2 (apollographql/ap…
svc-secops Jun 28, 2024
9756ce1
split: apollo-ios-codegen - PR #409 - chore(deps): update dependency …
Jun 28, 2024
b29c7ea
Squashed 'apollo-ios-codegen/' changes from a0bb4ed8..c989dad2
Jun 28, 2024
6e084c2
Adjusting release workflow (apollographql/apollo-ios-dev#401)
BobaFetters Jun 28, 2024
6d02094
fix(deps): update dependency graphql to v17.0.0-alpha.5 (apollographq…
svc-secops Jun 28, 2024
81ad8a6
Squashed 'apollo-ios-codegen/' changes from c989dad2..e5c5322b
Jun 28, 2024
6984bb0
split: apollo-ios-codegen - PR #408 - fix(deps): update dependency gr…
Jun 28, 2024
b6540b8
chore(deps): update actions/add-to-project action to v1.0.2 (apollogr…
svc-secops Jul 2, 2024
97c48da
Squashed 'apollo-ios/' changes from 84196082..aa8db7c3
Jul 2, 2024
02b7885
split: apollo-ios - PR #411 - chore(deps): update actions/add-to-proj…
Jul 2, 2024
0df6da0
Adding debugDescription to SelectionSets (apollographql/apollo-ios-de…
BobaFetters Jul 2, 2024
3dce450
split: apollo-ios - PR #412 - Adding debugDescription to SelectionSets
Jul 2, 2024
0c6d44c
Squashed 'apollo-ios/' changes from aa8db7c3..fe326385
Jul 2, 2024
0346694
ci: Adds a manually triggered action for Xcode Beta version testing (…
calvincestari Jul 4, 2024
18771cf
ci: Fix Xcode beta version number (apollographql/apollo-ios-dev#416)
calvincestari Jul 5, 2024
746ff71
ci: Target beta versions of xcode
calvincestari Jul 5, 2024
5d1106a
chore(deps): update dependency typescript to v5.5.3 (apollographql/ap…
svc-secops Jul 5, 2024
8710389
split: apollo-ios-codegen - PR #418 - chore(deps): update dependency …
Jul 5, 2024
b850b5f
Squashed 'apollo-ios-codegen/' changes from e5c5322b..4bd74995
Jul 5, 2024
c1bdf86
[README] Add dark mode logo (apollographql/apollo-ios-dev#420)
martinbonnin Jul 9, 2024
9a89224
split: apollo-ios - PR #420 - [README] Add dark mode logo
Jul 9, 2024
d69a6c4
Squashed 'apollo-ios/' changes from fe326385..dbe53502
Jul 9, 2024
b0090e1
Squashed 'apollo-ios-pagination/' changes from 8e073198..e89e65da
Jul 9, 2024
b9380a2
split: apollo-ios-pagination - PR #420 - [README] Add dark mode logo
Jul 9, 2024
3dab235
Add editor config files (apollographql/apollo-ios-dev#419)
BobaFetters Jul 10, 2024
4e3b5dc
Update "Who is Apollo?" (apollographql/apollo-ios-dev#422)
Meschreiber Jul 10, 2024
09c86d1
PR Title handling update (apollographql/apollo-ios-dev#423)
BobaFetters Jul 10, 2024
100ad75
Update router terms (apollographql/apollo-ios-dev#385)
Meschreiber Jul 10, 2024
11058ac
Adding usage note to "Pagination Introduction" docs (apollographql/ap…
BobaFetters Jul 10, 2024
c9bcc24
PR Title escaping update (apollographql/apollo-ios-dev#425)
BobaFetters Jul 10, 2024
3497c4a
fix: Local cache mutation build error in Swift 6 (apollographql/apoll…
calvincestari Jul 11, 2024
8e018c1
Squashed 'apollo-ios/' changes from dbe53502..9b87ee08
Jul 11, 2024
571b2ca
split: apollo-ios - PR #417 - fix: Local cache mutation build error i…
Jul 11, 2024
f0f4f89
Squashed 'apollo-ios-codegen/' changes from 4bd74995..fb192097
Jul 11, 2024
fb1b801
split: apollo-ios-codegen - PR #417 - fix: Local cache mutation build…
Jul 11, 2024
20d3a36
Update ROADMAP.md
AnthonyMDev Jul 16, 2024
304b53d
Disabling flaky test (apollographql/apollo-ios-dev#429)
BobaFetters Jul 16, 2024
fee4ef7
Squashed 'apollo-ios/' changes from 9b87ee08..06c1a891
Jul 16, 2024
318a93a
split: apollo-ios - PR #429 - Disabling flaky test
Jul 16, 2024
6090183
Field Merging[1/x] Configuration Options
AnthonyMDev Mar 21, 2024
41f58c4
Make FieldMerging config use MergeStrategy internally and implement s…
AnthonyMDev Mar 25, 2024
baafdc3
Field Merging[2/x] Compute MergedSelections w/MergingStrategy
AnthonyMDev Mar 21, 2024
5719a04
Adding tests and improving merging algorithm for merge strategy
AnthonyMDev Mar 26, 2024
844959a
Implement FieldMerging in SelectionSetTemplate
AnthonyMDev Mar 26, 2024
4a17e7d
Selection set inititializer generated with all field merging always
AnthonyMDev Mar 26, 2024
a3e3b18
fix child selection set computation for field merging and add more tests
AnthonyMDev Mar 26, 2024
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
The table of contents is too big for display.
Diff view
Diff view
  •  
  •  
  •  
8 changes: 8 additions & 0 deletions .editorconfig
Original file line number Diff line number Diff line change
@@ -0,0 +1,8 @@
# editorconfig.org
root = true

[*]
indent_style = space
indent_size = 2
trim_trailing_whitespace = true
insert_final_newline = true
33 changes: 33 additions & 0 deletions .github/actions/create-pr/action.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,33 @@
name: "Create Pull Request"
description: "Creates a pull request with the given parameters."
inputs:
access-token:
description: "The Personal Access Token with proper permissions to the given repository."
required: true
repo:
description: "The name of the repository to create the PR in."
required: true
base-branch:
description: "The target branch for the pull request"
required: true
default: "main"
head-branch:
description: "The branch containing the commits for your pull request."
required: true
reviewers:
description: "The reviewers to add to the pull request."
title:
description: "The title for the pull request."
required: true
body:
description: "The body information for the pull request."
required: true
runs:
using: "composite"
steps:
- name: Repository Dispatch
shell: bash
run: |
gh pr create --repo "${{ inputs.repo }}" --base "${{ inputs.base-branch }}" --head "${{ inputs.head-branch }}" --reviewer "${{ inputs.reviewers }}" --title "${{ inputs.title }}" --body "${{ inputs.body }}"
env:
GH_TOKEN: ${{ inputs.access-token }}
2 changes: 1 addition & 1 deletion .github/actions/run-cocoapods-integration-tests/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ runs:
shell: bash
working-directory: Tests/CodegenCLITests/pod-install-test/
run: |
./Pods/Apollo/apollo-ios-cli init --schema-name NewTestSchema --module-type other
./Pods/Apollo/apollo-ios-cli init --schema-namespace NewTestSchema --module-type other
- name: CocoaPods - CLI Test (generate)
shell: bash
working-directory: Tests/CodegenCLITests/pod-install-test/
Expand Down
6 changes: 4 additions & 2 deletions .github/actions/subtree-split-push/action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -21,10 +21,12 @@ runs:
steps:
- name: Split and Push ${{ inputs.subtree }}
shell: bash
env:
PR_TITLE: ${{ inputs.pr-title }}
run: |
git fetch ${{ inputs.remote }} ${{ inputs.target-branch }}
sh git-subtree.sh pull -P ${{ inputs.subtree }} --squash -m "pull: ${{ inputs.subtree }} - PR #${{ inputs.pr-number }} - ${{ inputs.pr-title }}" ${{ inputs.remote }} ${{ inputs.target-branch }}
splitResult=$(sh git-subtree.sh -P ${{ inputs.subtree }} split --squash --rejoin -m "split: ${{ inputs.subtree }} - PR #${{ inputs.pr-number }} - ${{ inputs.pr-title }}")
sh git-subtree.sh pull -P ${{ inputs.subtree }} --squash -m "pull: ${{ inputs.subtree }} - PR #${{ inputs.pr-number }} - $PR_TITLE" ${{ inputs.remote }} ${{ inputs.target-branch }}
splitResult=$(sh git-subtree.sh -P ${{ inputs.subtree }} split --squash --rejoin -m "split: ${{ inputs.subtree }} - PR #${{ inputs.pr-number }} - $PR_TITLE")
if [ ! -z "$splitResult" ]
then
sh git-subtree.sh push -P ${{ inputs.subtree }} ${{ inputs.remote }} ${{ inputs.target-branch }}
Expand Down
250 changes: 250 additions & 0 deletions .github/workflows/ci-tests-xcode-beta.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,250 @@
name: "CI Tests (Xcode 16.0 Beta)"

on:
pull_request:
types: [opened, synchronize, reopened]

env:
XCODE_VERSION: "16.0-beta"

jobs:
changes:
runs-on: ubuntu-latest
outputs:
ios: ${{ steps.filter.outputs.ios }}
codegen: ${{ steps.filter.outputs.codegen }}
pagination: ${{ steps.filter.outputs.pagination }}
tuist: ${{ steps.filter.outputs.tuist }}
steps:
- uses: actions/checkout@v4
- uses: dorny/paths-filter@v2
id: filter
with:
filters: |
ios:
- 'apollo-ios/**'
- 'Tests/ApolloInternalTestHelpers/**'
- 'Tests/ApolloServerIntegrationTests/**'
- 'Tests/ApolloTests/**'
codegen:
- 'apollo-ios-codegen/**'
- 'Tests/ApolloCodegenInternalTestHelpers/**'
- 'Tests/ApolloCodegenTests/**'
- 'Tests/CodegenCLITests/**'
- 'Tests/CodegenIntegrationTests/**'
- 'Tests/TestCodeGenConfigurations/**'
pagination:
- 'apollo-ios-pagination/**'
- 'Tests/ApolloInternalTestHelpers/**'
- 'apollo-ios/**'
tuist:
- '.tuist-version'

tuist-generation:
runs-on: macos-latest
needs: [changes]
if: ${{ needs.changes.outputs.ios == 'true' || needs.changes.outputs.codegen == 'true' || needs.changes.outputs.pagination == 'true' || needs.changes.outputs.tuist == 'true' }}
timeout-minutes: 8
name: Run Tuist Generation
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: Run Tuist Generation
uses: ./.github/actions/run-tuist-generation
- name: Cache Build Dependencies
uses: actions/cache@v3
with:
path: |
./ApolloDev.xcodeproj
./ApolloDev.xcworkspace
./Derived/*
key: ${{ github.run_id }}-dependencies

run-swift-builds:
runs-on: macos-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
include:
- package: apollo-ios
- package: apollo-ios-codegen
- package: apollo-ios-pagination
name: Run swift build for SPM packages
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: Run Swift Build
shell: bash
run: |
cd ${{ matrix.package }} && swift build

# build-and-unit-test:
# runs-on: macos-latest
# needs: [tuist-generation, changes]
# timeout-minutes: 20
# strategy:
# fail-fast: false
# matrix:
# include:
# # macOS_current
# - destination: platform=macOS,arch=x86_64
# scheme: ApolloTests
# test-plan: Apollo-CITestPlan
# name: Apollo Unit Tests - macOS
# run-js-tests: false
# should-run: ${{ needs.changes.outputs.ios }}
# # Codegen CLI Test
# - destination: platform=macOS,arch=x86_64
# scheme: CodegenCLITests
# test-plan: CodegenCLITestPlan
# name: Codegen CLI Unit Tests - macOS
# run-js-tests: false
# should-run: ${{ needs.changes.outputs.codegen }}
# # CodegenLib Test
# - destination: platform=macOS,arch=x86_64
# scheme: ApolloCodegenTests
# test-plan: Apollo-Codegen-CITestPlan
# name: Codegen Lib Unit Tests - macOS
# run-js-tests: true
# should-run: ${{ needs.changes.outputs.codegen }}
# # ApolloPagination Tests
# - destination: platform=macOS,arch=x86_64
# scheme: ApolloPaginationTests
# test-plan: Apollo-PaginationTestPlan
# name: ApolloPagination Unit Tests - macOS
# run-js-tests: false
# should-run: ${{ needs.changes.outputs.pagination }}
# name: ${{ matrix.name }}
# steps:
# - uses: maxim-lobanov/setup-xcode@v1
# with:
# xcode-version: ${{ env.XCODE_VERSION }}
# - name: Checkout Repo
# uses: actions/checkout@v3
# - name: Retrieve Build Cache
# uses: actions/cache@v3
# with:
# path: |
# ./ApolloDev.xcodeproj
# ./ApolloDev.xcworkspace
# ./Derived/*
# key: ${{ github.run_id }}-dependencies
# fail-on-cache-miss: true
# # Caching for apollo-ios and apollo-ios-codegen SPM dependencies
# # - uses: actions/cache@v3
# # with:
# # path: ./DerivedData/SourcePackages
# # key: ${{ runner.os }}-spm-${{ hashFiles('./apollo-ios/Package.resolved') }}-${{ hashFiles('./apollo-ios-codegen/Package.resolved') }}
# # - name: Run Tuist Generation
# # uses: tuist/[email protected]
# # with:
# # command: 'generate'
# # arguments: ''
# - name: Build and Test
# if: ${{ matrix.should-run == true || matrix.should-run == 'true' }}
# id: build-and-test
# uses: ./.github/actions/build-and-run-unit-tests
# with:
# destination: ${{ matrix.destination }}
# scheme: ${{ matrix.scheme }}
# test-plan: ${{ matrix.test-plan }}
# - name: Run-JS-Tests
# if: ${{ matrix.run-js-tests == true }}
# shell: bash
# working-directory: apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript/
# run: |
# npm install && npm test
# - name: Save xcodebuild logs
# if: ${{ steps.build-and-test.outcome != 'skipped' }}
# uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.name }}-logs
# path: |
# DerivedData/Logs/Build
# - name: Save crash logs
# if: ${{ steps.build-and-test.outcome != 'skipped' }}
# uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.name }}-crashes
# path: |
# ~/Library/Logs/DiagnosticReports
# - name: Zip Result Bundle
# if: ${{ steps.build-and-test.outcome != 'skipped' }}
# shell: bash
# working-directory: TestResults
# run: |
# zip -r ResultBundle.zip ResultBundle.xcresult
# - name: Save test results
# if: ${{ steps.build-and-test.outcome != 'skipped' }}
# uses: actions/upload-artifact@v3
# with:
# name: ${{ matrix.name }}-results
# path: |
# TestResults/ResultBundle.zip

# CodegenTestConfigurations removed because source is not compatible with Sendable yet.

verify-frontend-bundle-latest:
runs-on: macos-latest
needs: [changes]
if: ${{ needs.changes.outputs.codegen == 'true' }}
timeout-minutes: 5
name: Verify Frontend Bundle Latest - macOS
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Build JS Bundle
shell: bash
working-directory: apollo-ios-codegen/Sources/GraphQLCompiler/JavaScript
run: npm install && ./auto_rollup.sh
- name: Verify Latest
shell: bash
run: |
git diff --exit-code

verify-cli-binary-archive:
runs-on: macos-latest
needs: [changes]
if: ${{ needs.changes.outputs.codegen == 'true' }}
timeout-minutes: 5
name: Verify CLI Binary Archive - macOS
steps:
- name: Checkout Repo
uses: actions/checkout@v3
- name: Extract CLI Binary
shell: bash
working-directory: apollo-ios/CLI
run: tar -xf apollo-ios-cli.tar.gz apollo-ios-cli
- name: Verify Version
shell: bash
working-directory: apollo-ios/scripts
run: ./cli-version-check.sh

run-cocoapods-integration-tests:
runs-on: macos-latest
timeout-minutes: 20
name: Cocoapods Integration Tests - macOS
steps:
- uses: maxim-lobanov/setup-xcode@v1
with:
xcode-version: ${{ env.XCODE_VERSION }}
- name: Checkout Repo
uses: actions/checkout@v3
- name: Export ENV Variables
shell: bash
working-directory: apollo-ios
run: |
apollo_ios_sha=$(git rev-parse HEAD)
echo "APOLLO_IOS_SHA=$apollo_ios_sha" >> ${GITHUB_ENV}
- name: Run CocoaPods Integration Tests
id: run-cocoapods-integration-tests
uses: ./.github/actions/run-cocoapods-integration-tests

# IntegrationTests removed because source is not compatible with Sendable yet.
Loading