Skip to content

[Phase 8] Add E2E path filtering for Bitrise#417

Draft
kieran-osgood-shopify wants to merge 1 commit into
kieran-osgood/e2e-browserstack/phase-7-soft-launchfrom
kieran-osgood/e2e-browserstack/phase-8-path-filters
Draft

[Phase 8] Add E2E path filtering for Bitrise#417
kieran-osgood-shopify wants to merge 1 commit into
kieran-osgood/e2e-browserstack/phase-7-soft-launchfrom
kieran-osgood/e2e-browserstack/phase-8-path-filters

Conversation

@kieran-osgood-shopify

@kieran-osgood-shopify kieran-osgood-shopify commented Jul 7, 2026

Copy link
Copy Markdown
Contributor

Why?

GitHub and Bitrise both need changed-file decisions.
Github uses dorny/paths-filter.
Bitrise has built in support for a regex, but its more limiting than what we have in Github actions.

The approach taken in bitrise is two prong:

  1. Bitrise regex to give a coarse grain skip if only things like markdown files have changed (we know no workflows need triggering
  2. If the flow passes beyond the regex, each workflow has its own changed files filter script to determine whether it has any matches, it uses an deny-allow-deny approach
    File matching:
    a. files are **implicitly ** excluded by default
    b. explicitly included files will cause the workflow to run
    c. unless there is explicit deny, in which case its excluded

What?

  • .github/filters/platform-non-docs.yml moved to .ci/changed-file-filters.yml for re-use across bitrise and .github
  • Adds focused scripts/changed_file_filters / scripts/lib/changed_file_filters.rb helpers for reusable changed-file filter evaluation outside GitHub Actions where we cannot use dorny/paths-filter.
  • Updates the Bitrise E2E run-plan producer to use shared filter groups from .ci/changed-file-filters.yml.
  • Adds a coarse Bitrise changed_files.regex trigger and uses generated E2E_BUILD_* variables to skip unrelated Bitrise workflows.

How to test

shadowenv exec -- ruby e2e/scripts/e2e_matrix_to_browserstack_run_plan validate
shadowenv exec -- ruby e2e/scripts/e2e_matrix_to_browserstack_run_plan expand --changed-file platforms/swift/Sources/Foo.swift
shadowenv exec -- ruby e2e/scripts/e2e_matrix_to_browserstack_run_plan expand --changed-file protocol/languages/typescript/src/generated/Models.ts
shadowenv exec -- scripts/changed_file_filters list --changed-file platforms/react-native/modules/@shopify/checkout-kit-react-native/src/index.ts
shadowenv exec -- ruby -e 'require "yaml"; %w[.github/workflows/ci.yml .github/workflows/package-size.yml .ci/changed-file-filters.yml e2e/config/matrix.yml e2e/bitrise.yml].each { |path| YAML.safe_load_file(path, aliases: true) }; puts "yaml ok"'
shadowenv exec -- bitrise validate --config=e2e/bitrise.yml
shadowenv exec -- /opt/dev/bin/dev check e2e-bitrise-validate

Copy link
Copy Markdown
Contributor Author

@github-actions github-actions Bot added the #gsd:50662 Rebase Checkout Kit on UCP label Jul 7, 2026
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-8-path-filters branch from e6803ea to fc3c69a Compare July 7, 2026 16:51
Comment thread e2e/BITRISE.md
## PR trigger

`e2e/bitrise.yml` maps pull requests to the `e2e` pipeline with `trigger_map`. The GitHub checks are kept non-required while `E2E_STRICT=false`.
`e2e/bitrise.yml` maps pull requests to the `e2e` pipeline with `trigger_map`. The trigger uses Bitrise `changed_files.regex` as a coarse source-tree gate for Checkout Kit platform, protocol, shared filter, package, and E2E paths. Bitrise does not support the same named include/exclude filter objects as GitHub Actions, so app-level filtering is enforced by `e2e/config/matrix.yml` and `e2e/scripts/e2e_matrix_to_browserstack_run_plan` after the pipeline starts.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
`e2e/bitrise.yml` maps pull requests to the `e2e` pipeline with `trigger_map`. The trigger uses Bitrise `changed_files.regex` as a coarse source-tree gate for Checkout Kit platform, protocol, shared filter, package, and E2E paths. Bitrise does not support the same named include/exclude filter objects as GitHub Actions, so app-level filtering is enforced by `e2e/config/matrix.yml` and `e2e/scripts/e2e_matrix_to_browserstack_run_plan` after the pipeline starts.
`e2e/bitrise.yml` maps pull requests to the `e2e` pipeline with `trigger_map`. The trigger uses Bitrise `changed_files.regex` as a coarse source-tree gate for Checkout Kit platform, protocol, shared filter, package, and E2E paths. Bitrise does not support the same named include/exclude filter objects as GitHub Actions, so `platforms` level filtering is enforced by `e2e/config/matrix.yml` and `e2e/scripts/e2e_matrix_to_browserstack_run_plan` after the pipeline starts (essentially fulfilling the same need that `dorny/paths-filter` holds in github.

Comment thread e2e/BITRISE.md

Markdown and `docs/` changes are excluded by the app-level filters. A docs-only change under a coarse Bitrise trigger path can still start the lightweight run-plan workflow, but it will produce an empty run plan and skip app build, BrowserStack execution, and reporting workflows.

The GitHub checks are kept non-required while `E2E_STRICT=false`.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
The GitHub checks are kept non-required while `E2E_STRICT=false`.
The GitHub checks are kept non-blocking while `E2E_STRICT=false`.

Comment thread e2e/BITRISE.md

Shared changed-file filter groups live in `.ci/changed-file-filters.yml` and are consumed by both GitHub Actions and Bitrise E2E. Each application in `e2e/config/matrix.yml` declares `changed_files_filters` by shared group name. The run-plan producer fetches the PR file list from GitHub, applies those groups, emits only matching application rows into the BrowserStack run plan, and shares `E2E_BUILD_*` variables that gate downstream Bitrise build workflows with `run_if`.

Markdown and `docs/` changes are excluded by the app-level filters. A docs-only change under a coarse Bitrise trigger path can still start the lightweight run-plan workflow, but it will produce an empty run plan and skip app build, BrowserStack execution, and reporting workflows.

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Suggested change
Markdown and `docs/` changes are excluded by the app-level filters. A docs-only change under a coarse Bitrise trigger path can still start the lightweight run-plan workflow, but it will produce an empty run plan and skip app build, BrowserStack execution, and reporting workflows.
Markdown and `docs/` changes are excluded by the `platforms` level filters at runtime during the `e2e-produce-browserstack-run-plan` workflow. A docs-only change under a coarse Bitrise trigger path can still start the lightweight ` e2e-produce-browserstack-run-plan` workflow (~15 seconds runtime), but it will produce an empty run plan and skip app build, BrowserStack execution, and reporting workflows.

Comment thread e2e/bitrise.yml
- pull_request_source_branch: "*"
draft_pull_request_enabled: false
changed_files:
regex: '^(platforms/(swift|android|react-native)|protocol|e2e|\.ci)/.*|^Package\.(swift|resolved)$'

@kieran-osgood-shopify kieran-osgood-shopify Jul 7, 2026

Copy link
Copy Markdown
Contributor Author

Choose a reason for hiding this comment

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

Debating whether we remove this and only rely on the run-plan platforms level filtering at runtime
It likely only saves us seconds in machine startup before the run_if determines the workflow shouldn't run

@kieran-osgood-shopify kieran-osgood-shopify changed the base branch from kieran-osgood/e2e-browserstack/phase-7-soft-launch to graphite-base/417 July 8, 2026 10:11
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-8-path-filters branch from fc3c69a to 5f078b7 Compare July 8, 2026 11:41
@kieran-osgood-shopify kieran-osgood-shopify changed the base branch from graphite-base/417 to kieran-osgood/e2e-browserstack/phase-7-soft-launch July 8, 2026 11:42
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-7-soft-launch branch from ac6cc38 to a2c10bc Compare July 8, 2026 15:01
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-8-path-filters branch from 5f078b7 to 5c70153 Compare July 8, 2026 15:01
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-7-soft-launch branch from a2c10bc to 02227b8 Compare July 8, 2026 15:08
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-8-path-filters branch 2 times, most recently from 858b9de to ceb5011 Compare July 8, 2026 16:18
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-7-soft-launch branch 2 times, most recently from 92b0cf9 to b7aa8b6 Compare July 8, 2026 17:02
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-8-path-filters branch from ceb5011 to b08d7b3 Compare July 8, 2026 17:03
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-7-soft-launch branch from b7aa8b6 to c2fc448 Compare July 9, 2026 08:11
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-8-path-filters branch from b08d7b3 to 6959ac8 Compare July 9, 2026 08:12
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-7-soft-launch branch from c2fc448 to f060ca5 Compare July 9, 2026 09:34
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-8-path-filters branch from 6959ac8 to 06860b3 Compare July 9, 2026 09:34
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-7-soft-launch branch from f060ca5 to a06d480 Compare July 9, 2026 12:25
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-8-path-filters branch 2 times, most recently from 0300c1c to 4e6d041 Compare July 9, 2026 12:59
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-7-soft-launch branch from a06d480 to 9c07373 Compare July 9, 2026 12:59
@kieran-osgood-shopify kieran-osgood-shopify changed the base branch from kieran-osgood/e2e-browserstack/phase-7-soft-launch to graphite-base/417 July 9, 2026 16:25
@kieran-osgood-shopify kieran-osgood-shopify changed the title Add E2E path filtering for Bitrise [Phase 8] Add E2E path filtering for Bitrise Jul 9, 2026
Assisted-By: devx/96a590ff-685a-49ce-8199-0810f0ac2379
@kieran-osgood-shopify kieran-osgood-shopify force-pushed the kieran-osgood/e2e-browserstack/phase-8-path-filters branch from 4e6d041 to f3436ba Compare July 10, 2026 17:02
@kieran-osgood-shopify kieran-osgood-shopify changed the base branch from graphite-base/417 to kieran-osgood/e2e-browserstack/phase-7-soft-launch July 10, 2026 17:02
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.

1 participant