Skip to content

Conversation

@ajpallares
Copy link
Contributor

@ajpallares ajpallares commented Feb 10, 2026

Motivation

Currently only a subset of tests run on PRs, and the full suite (all-tests) only runs on main/release or via manual trigger. New contributors don't know about the manual trigger, so PRs can be merged without the full test suite passing.

Additionally, on release branches the hold job for tagging a release only requires release-checks to pass — it does not require the full test suite. This means a release can be approved and tagged even if some tests are failing.

Description

run-all-tests workflow for PR branches only (formerly build-test workflow): splits jobs into two groups with a hold-gated approval step.

  • Reduced Test Suite (runs automatically): lint, check-api-changes, validate-package-swift, run-test-ios-26, pod-lib-lint, run-revenuecat-ui-ios-26, emerge_purchases_ui_snapshot_tests, emerge_binary_size_analysis, build-tv-watch-and-macos, build-visionos
  • Full Test Suite (requires approving a hold job): all remaining jobs, unlocked by approving approve-full-tests.
  • all-tasks-passed: summary gate requiring all jobs to pass — set as a required GitHub check to block merges.
  • Workflow now excludes main and release/* branches to avoid redundant runs.

release-or-main workflow (renamed from all-tests): runs the full test suite on main, release/*, and manual triggers.

  • Adds all-tasks-passed summary gate requiring all jobs.
  • Absorbs release-checks, hold, and tag-release-branch from the removed create-tag workflow, so the release hold job approve-release requires both release-checks and all-tasks-passed.
Branch type Behavior
PR branches Reduced Test Suite runs automatically. Approve approve-full-tests to unlock Full Test Suite. Merge blocked until all-tasks-passed.
Release branches All tests run in parallel (no hold). Release hold job approve-release requires both release-checks and all-tasks-passed.
main All tests run in parallel. No release jobs.

Note

Triggering the full test suite via @RCGitBot please test is not needed anymore for PRs into main, since build-test already executes and requires the full suite (gated behind approve-full-tests). This trigger can still be useful for PRs that have a base branch different to main. In addition, the run-manual-tests CI parameter can still be useful for WIP branches that don't have an associated PR.

@ajpallares ajpallares force-pushed the pallares/change-ci-structure-for-PRs branch from 3b63721 to d57584b Compare February 10, 2026 10:25
@ajpallares ajpallares force-pushed the pallares/change-ci-structure-for-PRs branch from d57584b to 6fbfe51 Compare February 10, 2026 10:26
Move release-checks, hold, and tag-release-branch into the ci workflow (formerly all-tests) so the release hold requires both release-checks and all-tests-passed. Remove standalone create-tag workflow.
The "ci" workflow already includes everything
@ajpallares ajpallares force-pushed the pallares/change-ci-structure-for-PRs branch from 2758b9b to 4d78abd Compare February 10, 2026 11:20
@ajpallares ajpallares changed the title Gate full CI suite behind approval hold job to prevent broken merges Restructure CI with tiered PR checks and release gating Feb 10, 2026
@ajpallares ajpallares marked this pull request as ready for review February 10, 2026 12:04
@ajpallares ajpallares requested a review from a team as a code owner February 10, 2026 12:04
@claude
Copy link

claude bot commented Feb 10, 2026

Code review

No issues found. Checked for bugs and CLAUDE.md compliance.

Copy link
Contributor

@tonidero tonidero left a comment

Choose a reason for hiding this comment

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

Looking great! mostly some naming and small thing comments 🙌

steps:
- run:
name: Full suite gate passed
command: echo "Tier 1 passed and full tests approved - unlocking Tier 2"
Copy link
Contributor

Choose a reason for hiding this comment

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

I think the Tier 1 and Tier 2 comment can be confusing down the line once we forget or for new people. Maybe it should be something a bit more descriptive like Reduced Test Suite and Full Test Suite?

This applies to all mentions of these in this PR.

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Thanks for the suggestion! I like it!

- release-checks
- tag-release-branch:
- approve-full-tests
- lint
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm so seems we need to wait for the "reduced test suite" to finish before continuing with the full suite by having these here if I understand correctly?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

That's correct! I made it so that we can approve the "approve-full-tests" immediately, but yes, the full test suite will wait for the reduced test suit to complete before starting running.
WDYT? Would you rather have it run in parallel?

Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I feel if you accept the hold job before it finishes the others, it makes sense to run in parallel. That’s my 2 cents though, NABD :)

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. Tbh, I also had doubts about this.

it makes sense to run in parallel

That's actually how it still works with @RCGitBot please test: everything runs in parallel. The advantage of the hold job would be that it doesn't re-run the whole CI workflow, but just "unlocks" the full test suite.

So I'll remove the requirement of the other jobs for the full suite to start running. We can always tweak it in the future. Thanks for the suggestion!

# Summary gate: blocks merge until all Tier 2 jobs pass
# Add "ci/circleci: all-tests-passed" as a required check in GitHub
# =============================================================
- all-tests-passed:
Copy link
Contributor

Choose a reason for hiding this comment

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

Maybe we should rename to all-tasks-finished instead? So it's something we can reuse for the release workflow as well?

# - Name: action
# - Value: run-manual-tests
all-tests:
ci:
Copy link
Contributor

Choose a reason for hiding this comment

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

Hmm I'm not fully in love with this name for this workflow... Should it be release_or_main?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Right. I was torn on this one, as it's a workflow serving two purposes... it's true that it only runs on release branches or main. Honestly, I don't have a strong opinion and I do think release-or-main is clearer than just ci. however, this is the workflow that will run when we trigger the pipeline with the run-manual-tests parameter from CircleCI or with @RCGitBot please test.

Running tests manually won't be useful anymore for PRs, as now we'll have the hold job. However, there are some scenarios where we may want to run the release-or-main workflow for main (e.g. sometimes it does not get triggered correctly after merging a PR, so it needs to be run manually).

Still, having it be called release-or-main is clearer I think 👍

# =============================================================
# Summary gate: all tests passed
# =============================================================
- all-tests-passed:
Copy link
Contributor

Choose a reason for hiding this comment

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

I think this would allow a release PR to be merged without approving the hold job... Maybe this should run only after the tag_current_branch job has run successfully?

Copy link
Contributor Author

Choose a reason for hiding this comment

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

Hmmm that's a good catch. But then, AFAIK, I don't think we can achieve this.

If I'm not wrong, GitHub status checks cannot be made depend on the source branch. I.e. they are defined for all PRs with main as the base branch. That means the check we decide to have must apply to all PRs, all-tasks-finished in this case.

Now, on CI config.yml, this would mean that all-tasks-finished should be different for release branches. I.e. we would need all-tasks-finished to require tag-release-branch. But that would not work for non-release PRs into main, where tag-release-branch is never run.

Am I missing something perhaps? I can try to think on workarounds for this though

Copy link
Contributor Author

Choose a reason for hiding this comment

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

I was confused, as all-tasks-passed (formerly, briefly known as all-tasks-finished) can actually have different requires in release-or-main vs run-all-tests.

So I implemented your proposal in fcb9287.

It makes total sense and it's way better to block merging the Release PR until after tag-release-branch runs. Great great suggestions! Thanks!

Copy link
Contributor Author

Choose a reason for hiding this comment

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

After some internal discussion, I've reverted it back to what we had before.
The reasoning is sometimes we need to push changes to the release branch after the release happens (main example of this: merging main into the release branch).

This way, we can still merge release PRs into main even after new commits pushed to it.

In any case, with this PR + #6243 the whole release process should improve, as we should not manually merge release PRs anymore.

We can always iterate

@ajpallares
Copy link
Contributor Author

@RevenueCat/coresdk I think this is now ready to be reviewed. I believe I addressed all comments from @tonidero's great review.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants