Skip to content

Add ci-ios PR pipeline - #635

Open
kieran-osgood-shopify wants to merge 1 commit into
kieran-osgood/macos-ci-3-bitrise-prerequisitesfrom
kieran-osgood/macos-ci-4-bitrise-gate
Open

Add ci-ios PR pipeline#635
kieran-osgood-shopify wants to merge 1 commit into
kieran-osgood/macos-ci-3-bitrise-prerequisitesfrom
kieran-osgood/macos-ci-4-bitrise-gate

Conversation

@kieran-osgood-shopify

@kieran-osgood-shopify kieran-osgood-shopify commented Aug 13, 2026

Copy link
Copy Markdown
Contributor

Part of the macOS CI speed-up
Epic
Issue

What

Adds a new ci-ios pipeline in bitrise
ci-ios will be non-blocking until stable and will run in parallel to the github actions
ci-ios will run all macos xcode jobs to improve speed

Why

Bitrise reports one status per pipeline.
Reusing the e2e pipeline would tie the merge gate to the BrowserStack device flake that e2e/BITRISE.md:53 deliberately keeps non-blocking.

How it works

  1. ci-ios-plan runs on the cheap default Linux stack. It derives the changed files, maps them through e2e/config/ios_ci.yml, and publishes one CI_IOS_* flag per job with share-pipeline-variable@1. Every macOS machine his pipeline boots is decided here, so a change needing no iOS job costs one short Linux build.
  2. Each job workflow carries a run_if on its own flag.
  3. ci-ios-report has no run_if and should_always_run: workflow. It posts the Checkout Kit iOS check run on every build, including one where the plan selected nothing.

The trigger_map entry for ci-ios has no changed_files filter, on purpose.
A required check that never posts leaves a pull request permanently unmergeable, so the trigger is unconditional and the cheap Linux gate decides the rest.

Files

File Role
e2e/config/ios_ci.yml job → changed-file-filter mapping
e2e/lib/ios_ci_run_plan.rb selection, flag names, validation
e2e/lib/ios_ci_reporter.rb the Checkout Kit iOS check run
e2e/scripts/ios_ci_run_plan validate / bitrise-env / selected-jobs / assert-pipeline-coverage
e2e/scripts/report_ios_ci_results Bitrise entry point for the reporter
e2e/scripts/bitrise_ci_helpers changed-files, branch config, GitHub token — shared with the E2E gate

Before you merge

Important

  • I've added tests to support my implementation
  • I have read and agree with the Contribution Guidelines
  • I have read and agree with the Code of Conduct
  • I've updated the relevant platform README (platforms/swift/README.md and/or platforms/android/README.md)

Releasing a new Swift version?
  • I have bumped the version in ShopifyCheckoutKit.podspec
  • I have bumped the version in platforms/swift/Sources/ShopifyCheckoutKit/ShopifyCheckoutKit.swift
  • I have updated the SwiftPM/CocoaPods version snippets in platforms/swift/README.md (major version only)
Releasing a new Embedded Checkout Protocol version?
  • I have bumped embeddedCheckoutProtocolAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated protocol/languages/kotlin/embedded-checkout-protocol/api/embedded-checkout-protocol.api if the public API changed
Releasing a new Android version?
  • I have bumped checkoutKitAndroid in platforms/android/gradle/libs.versions.toml
  • I have updated the Gradle/Maven version snippets in platforms/android/README.md

Tip

See the Contributing documentation for the full release process per platform.

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Aug 13, 2026
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/macos-ci-3-bitrise-prerequisites branch from db74123 to dc792a1 Compare August 13, 2026 09:22
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/macos-ci-4-bitrise-gate branch 2 times, most recently from ade88b9 to f952221 Compare August 13, 2026 11:36
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/macos-ci-3-bitrise-prerequisites branch from dc792a1 to 2d471a8 Compare August 13, 2026 11:36
@kieran-osgood-shopify kieran-osgood-shopify changed the title Add the Bitrise ci-ios gate and port the Swift package tests Add ci-ios PR pipeline Aug 13, 2026
@kieran-osgood-shopify
kieran-osgood-shopify marked this pull request as ready for review August 14, 2026 11:17
@kieran-osgood-shopify
kieran-osgood-shopify requested a review from a team as a code owner August 14, 2026 11:17
@kieran-osgood-shopify kieran-osgood-shopify changed the title Add ci-ios PR pipeline DRAFT Add ci-ios PR pipeline Aug 14, 2026
@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown

Web — Coverage Report

Lines Statements Branches Functions
Coverage: 96%
94.62% (299/316) 81.72% (152/186) 98.71% (77/78)

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown

React Native — Coverage Report

Lines Statements Branches Functions
Coverage: 92%
91.64% (307/335) 88.88% (176/198) 100% (81/81)

@github-actions

github-actions Bot commented Aug 14, 2026

Copy link
Copy Markdown

Package Size

Platform Artifact Base Head Delta
Web npm tarball 70.5 KiB 70.5 KiB 0 B
React Native npm tarball 101.6 KiB 101.6 KiB 0 B
Android release AAR 281.8 KiB 281.8 KiB 0 B
Web file breakdown
File Base Head Delta
dist/index.js.map 192.1 KiB 192.1 KiB 0 B
dist/index.d.ts 44.9 KiB 44.9 KiB 0 B
dist/custom-elements.json 44.0 KiB 44.0 KiB 0 B
dist/index.js 31.5 KiB 31.5 KiB 0 B
README.md 19.0 KiB 19.0 KiB 0 B
package.json 2.8 KiB 2.8 KiB 0 B
LICENSE 1.1 KiB 1.1 KiB 0 B
React Native file breakdown
File Base Head Delta
node_modules/@shopify/checkout-kit-protocol/src/generated/Models.ts 85.4 KiB 85.4 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/Models.d.ts 53.0 KiB 53.0 KiB 0 B
ios/AcceleratedCheckoutButtons.swift 14.1 KiB 14.1 KiB 0 B
ios/ShopifyCheckoutKit.swift 13.5 KiB 13.5 KiB 0 B
src/components/AcceleratedCheckoutButtons.tsx 13.0 KiB 13.0 KiB 0 B
android/src/main/java/com/shopify/reactnative/checkoutkit/ShopifyCheckoutKitModule.java 12.8 KiB 12.8 KiB 0 B
lib/commonjs/index.js 12.3 KiB 12.3 KiB 0 B
src/index.ts 12.2 KiB 12.2 KiB 0 B
lib/commonjs/components/AcceleratedCheckoutButtons.js 11.4 KiB 11.4 KiB 0 B
lib/commonjs/components/AcceleratedCheckoutButtons.js.map 10.4 KiB 10.4 KiB 0 B
lib/module/components/AcceleratedCheckoutButtons.js 10.2 KiB 10.2 KiB 0 B
lib/module/index.js 10.2 KiB 10.2 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolNotifications.ts 9.5 KiB 9.5 KiB 0 B
src/index.d.ts 9.1 KiB 9.1 KiB 0 B
lib/module/components/AcceleratedCheckoutButtons.js.map 9.1 KiB 9.1 KiB 0 B
src/present-dispatcher.ts 8.0 KiB 8.0 KiB 0 B
lib/module/index.js.map 7.9 KiB 7.9 KiB 0 B
lib/commonjs/index.js.map 7.7 KiB 7.7 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolNotifications.d.ts 7.6 KiB 7.6 KiB 0 B
node_modules/@shopify/checkout-kit-protocol/src/generated/ProtocolRenameMap.ts 7.2 KiB 7.2 KiB 0 B
…and 110 smaller files
Android file breakdown
File Base Head Delta
classes.jar 297.7 KiB 297.7 KiB 0 B
res/layout/checkout_view_content.xml 2.6 KiB 2.6 KiB 0 B
res/layout/checkout_sheet_content.xml 2.0 KiB 2.0 KiB 0 B
res/values/values.xml 1.3 KiB 1.3 KiB 0 B
R.txt 1.2 KiB 1.2 KiB 0 B
AndroidManifest.xml 922 B 922 B 0 B
proguard.txt 798 B 798 B 0 B
res/drawable/close.xml 431 B 431 B 0 B
res/menu/checkout_menu.xml 354 B 354 B 0 B
META-INF/com/android/build/gradle/aar-metadata.properties 157 B 157 B 0 B

Measured from the PR base SHA and PR head SHA. The file breakdown shows uncompressed sizes within each package artifact, so individual files do not sum to the compressed artifact total. This comment reports package artifact sizes only; it is not a final app binary-size report.

@bitrise

bitrise Bot commented Aug 14, 2026

Copy link
Copy Markdown

Install this build

Open Tophat, select your target device, then click Install. Links open on the Mac running Tophat.

SDK Install
React Native Install with Tophat
Swift Install with Tophat
Kotlin Install with Tophat

Checkout Kit E2E results

Status Suite Target Platform OS version tag Device
react-native-ios react-native ios latest iPhone 15
iOS 27 Beta
react-native-android react-native android latest Google Pixel 9
Android 17.0
kotlin-android kotlin android latest Google Pixel 9
Android 17.0
swift-ios swift ios latest iPhone 15
iOS 27 Beta

Failures

Caution

These E2E checks are not yet required, so they do not block merging — but a failure may still indicate a real issue to resolve before merging.
If you believe an assertion is flaky, please raise a ticket in the #checkout-kit-devs channel so it can be addressed.

BrowserStack artifacts require BrowserStack access. Sign in to BrowserStack App Automate before opening artifact links.

Android — react-native-android

Test Status Artifacts
./tests/shared/checkout-present-and-close BrowserStack · Video · Screenshot · Maestro commands · Maestro log

@kieran-osgood-shopify kieran-osgood-shopify changed the title DRAFT Add ci-ios PR pipeline Add ci-ios PR pipeline Aug 14, 2026
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/macos-ci-3-bitrise-prerequisites branch from 2d471a8 to 61287b4 Compare August 14, 2026 12:35
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/macos-ci-4-bitrise-gate branch from f952221 to 4a0efcf Compare August 14, 2026 12:36
# (changes since the merge-base, not tip-to-tip).
e2e_changed_files_file() {
local changed_files
changed_files="$(e2e_deploy_dir)/changed-files.txt"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could you just use a tmp file for this with mktemp?

[PLAN_STAGE_NAME] + @selected_job_ids.map { |id| "#{WORKFLOW_PREFIX}#{id}" }
end

def problem_stages

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P1] This fails open when BITRISEIO_FINISHED_WORKFLOWS is missing, malformed, or omits an expected stage. BitrisePipelineStages.parse then yields an empty roster, problem_stages is empty, and the required check reports success—even marking a selected job as passed. I reproduced that with a nil roster. Could we require every expected stage to be present with an explicit successful status, and add tests for invalid JSON plus entirely absent plan/job entries?

end

def conclusion
problem_stages.empty? ? "success" : "failure"

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] The shared stage parser treats succeeded_with_abort as success. That may be acceptable for the existing non-blocking E2E report, but for a required iOS test gate an aborted selected workflow should not count as evidence that its tests passed. Could this reporter require the literal succeeded status, or make the success policy injectable, with coverage for the aborted status?

e2e_branch_bitrise_config() {
local branch_config
branch_config="$(e2e_deploy_dir)/branch-bitrise.yml"
if [ -z "${BITRISE_PULL_REQUEST:-}" ] || [ -z "${BITRISE_GIT_COMMIT:-}" ] || ! git show "${BITRISE_GIT_COMMIT}:e2e/bitrise.yml" > "$branch_config" 2>/dev/null; then

Copy link
Copy Markdown
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

[P2] On a PR build, silently falling back to the merged e2e/bitrise.yml when the branch-head config cannot be read defeats the drift protection this helper is meant to provide. The coverage assertion then checks the wrong graph and can pass even though the selected workflow does not exist in the graph Bitrise resolved. Could the PR path fail closed with the rebase hint, keeping this fallback only for non-PR runs?

@kieran-osgood-shopify
kieran-osgood-shopify changed the base branch from kieran-osgood/macos-ci-3-bitrise-prerequisites to graphite-base/635 August 14, 2026 14:08
Part of the macOS CI speed-up. Tracked on shop/issues-checkout-kit#1206, under shop/issues-checkout-kit#1202.

## Why a new pipeline

Bitrise reports one status per pipeline. Reusing the `e2e` pipeline would tie
the merge gate to the BrowserStack device flake that `e2e/BITRISE.md:53`
deliberately keeps non-blocking. `ci-ios` is separate for that reason.

## How it works

1. `ci-ios-plan` runs on the cheap default Linux stack. It derives the changed
   files, maps them through `e2e/config/ios_ci.yml`, and publishes one
   `CI_IOS_*` flag per job with `share-pipeline-variable@1`. Every macOS machine
   this pipeline boots is decided here, so a change needing no iOS job costs one
   short Linux build.
2. Each job workflow carries a `run_if` on its own flag.
3. `ci-ios-report` has **no** `run_if` and `should_always_run: workflow`. It
   posts the `Checkout Kit iOS` check run on every build, including one where
   the plan selected nothing.

The `trigger_map` entry for `ci-ios` has no `changed_files` filter, on purpose.
A required check that never posts leaves a pull request permanently unmergeable,
so the trigger is unconditional and the cheap Linux gate decides the rest.

## Files

| File | Role |
| --- | --- |
| `e2e/config/ios_ci.yml` | job → changed-file-filter mapping |
| `e2e/lib/ios_ci_run_plan.rb` | selection, flag names, validation |
| `e2e/lib/ios_ci_reporter.rb` | the `Checkout Kit iOS` check run |
| `e2e/scripts/ios_ci_run_plan` | `validate` / `bitrise-env` / `selected-jobs` / `assert-pipeline-coverage` |
| `e2e/scripts/report_ios_ci_results` | Bitrise entry point for the reporter |
| `e2e/scripts/bitrise_ci_helpers` | changed-files, branch config, GitHub token — shared with the E2E gate |
| `e2e/BITRISE.md` | the `ci-ios` section: why the trigger is unfiltered, why the check is self-posted |
| `e2e/RUNBOOK.md` | "The iOS check failed or never posted", by symptom |

## Drift protection

Three invariants in `e2e/test/ios_ci_run_plan_test.rb` assert set-equality
between `ios_ci.yml`, the pipeline `run_if` expressions, and the
`share-pipeline-variable@1` list, read from the real `e2e/bitrise.yml`. Adding a
job to one side and not the others fails the suite. All three were confirmed red
against a deliberately broken config before this was submitted.

`ci-ios-plan` also runs `assert-pipeline-coverage` against the **branch head**
`e2e/bitrise.yml`. Bitrise resolves the pipeline graph from the branch head while
the plan is generated from the merged tree, so a stale branch can select a job
whose workflow does not exist. This fails it fast with a rebase hint.

## Verification

- `shadowenv exec -- ./scripts/test_ruby` — green.
- `shadowenv exec -- bitrise validate --config=e2e/bitrise.yml` — valid.
- CLI smoke tests for Swift-only, docs-only, and `e2e/bitrise.yml` changes.

Still to do on a real build, per the plan: four probe pull requests — Swift-only,
React Native-only, docs-only, and one touching `e2e/bitrise.yml`.
`Checkout Kit iOS` must post on all four with the right pass/skip split.

## Decisions made without you

- **Simulator**: settled on `iPhone 17 Pro` for every job. GitHub Actions used
  17 Pro for Swift and 16 Pro for React Native; one `app.envs` value replaces
  the split.
- **YAML anchor**: the `&macos_stack` definition moved to
  `ci-ios-swift-package-tests`, because YAML requires an anchor before its first
  alias and that workflow now comes first in document order.
- **Beyond the plan text**: `e2e-report` and `e2e-produce-browserstack-run-plan`
  were refactored onto the new shared helpers, so the two gates cannot derive
  different changed-file lists from one commit. The `scripts` infra filter in
  `ci.yml` was widened to `e2e/config/**` *and* `e2e/bitrise.yml`.
- **Docs land here, not in a separate PR**: the `BITRISE.md` and `RUNBOOK.md`
  sections describe this pipeline, so they ship with it. The stale `ruby: 3.3.6`
  in `BITRISE.md` is corrected to the actual `"3.4:installed"` in the same pass.

## Open question

`ci-ios-report` needs a GitHub token. `e2e_export_github_token` falls back to
the Bitrise GitHub App's `GIT_HTTP_PASSWORD`, which requires **Project settings
→ Repository → Extend GitHub App permissions to builds**. Please confirm that
setting is on before the soak.
@kieran-osgood-shopify
kieran-osgood-shopify force-pushed the kieran-osgood/macos-ci-4-bitrise-gate branch from 4a0efcf to 1473d71 Compare August 14, 2026 16:32
@kieran-osgood-shopify
kieran-osgood-shopify changed the base branch from graphite-base/635 to kieran-osgood/macos-ci-3-bitrise-prerequisites August 14, 2026 16:32
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

#gsd:50662 Rebase Checkout Kit on UCP

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants