Skip to content

Extend tuist-generate-workspace with include_test_dependencies param#6751

Merged
facumenzella merged 1 commit into
worktree-optimized-swinging-journalfrom
facu/fix-tuist-generate-workspace
May 8, 2026
Merged

Extend tuist-generate-workspace with include_test_dependencies param#6751
facumenzella merged 1 commit into
worktree-optimized-swinging-journalfrom
facu/fix-tuist-generate-workspace

Conversation

@facumenzella

@facumenzella facumenzella commented May 8, 2026

Copy link
Copy Markdown
Member

Followup to #6744.

Extends tuist-generate-workspace with an include_test_dependencies boolean param (default: false) and replaces the inline duplicate steps in the screenshot job with a call to the shared command, passing query: "PaywallScreenshotTests" to only generate what that job needs.

🤖 Generated with Claude Code


Note

Low Risk
Low risk CI refactor that only changes how the Tuist workspace generation step is parameterized and reused; main potential impact is unintended CI behavior if the env var value is interpreted differently by Tuist.

Overview
Updates the shared CircleCI tuist-generate-workspace command to accept an include_test_dependencies boolean and wires it to TUIST_INCLUDE_TEST_DEPENDENCIES instead of hardcoding test/dev dependencies off.

Refactors the paywall screenshot recording job to call tuist-generate-workspace with query: "PaywallScreenshotTests" and include_test_dependencies: true, removing duplicated inline Tuist install/generate steps.

Reviewed by Cursor Bugbot for commit a3aa829. Bugbot is set up for automated code reviews on this repo. Configure here.

Adds an `include_test_dependencies` boolean parameter (default: false) to
the shared `tuist-generate-workspace` command, then uses it in the
screenshot job with `query: "PaywallScreenshotTests"` so only that project
is generated.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
@facumenzella facumenzella requested a review from a team as a code owner May 8, 2026 07:18
@RevenueCat-Danger-Bot

Copy link
Copy Markdown
1 Error
🚫 Label the PR using one of the change type labels. If you are not sure which label to use, choose pr:other.
Label Description
pr:feat A new feature. Use along with pr:breaking to force a major release.
pr:fix A bug fix. Use along with pr:force_minor to force a minor release.
pr:other Other changes. Catch-all for anything that doesn't fit the above categories. Releases that only contain this label will not be released. Use along with pr:force_patch, or pr:force_minor to force a patch or minor release.
pr:RevenueCatUI Use along any other tag to mark a PR that only contains RevenueCatUI changes
pr:next_release Preparing a new release
pr:dependencies Updating a dependency
pr:phc_dependencies Updating purchases-hybrid-common dependency
pr:changelog_ignore The PR will not be included in the changelog. This label doesn't determine the type of bump of the version and must be combined with pr:feat, pr:fix or pr:other.

Generated by 🚫 Danger

@facumenzella facumenzella merged commit f9ed988 into worktree-optimized-swinging-journal May 8, 2026
8 of 18 checks passed
@facumenzella facumenzella deleted the facu/fix-tuist-generate-workspace branch May 8, 2026 07:23
facumenzella added a commit that referenced this pull request May 8, 2026
#6744)

* Add PaywallScreenshotTests as a dedicated Tuist project

Replaces the manually maintained RevenueCatUITestsDev scheme in
RevenueCat.xcodeproj with a self-contained Tuist project whose name
clearly communicates its purpose: rendering paywall templates and
capturing screenshots for visual validation.

The new project is gated behind TUIST_INCLUDE_TEST_DEPENDENCIES and
references UnitTestsHostApp from RevenueCatTests via a cross-project
dependency, keeping it self-contained without duplicating infrastructure.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Update record_paywall_screenshots lane to use PaywallScreenshotTests

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Generate Tuist workspace in paywall screenshot CI job

The screenshot job now uses RevenueCat-Tuist.xcworkspace instead of the
manually maintained RevenueCat.xcworkspace, so it needs tuist install +
generate before running tests. TUIST_INCLUDE_TEST_DEPENDENCIES=true is
required to include the PaywallScreenshotTests project.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Remove RevenueCatUITestsDev from RevenueCat.xcodeproj

Now superseded by the PaywallScreenshotTests Tuist project.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix CI: fetch paywall-preview-resources before tuist generate

Tuist validates folder reference paths at generate time. Running tuist
generate before the fetch meant paywall-preview-resources didn't exist
yet, so it was silently dropped from the bundle and the screenshot tests
failed with "Could not locate paywall-preview-resources".

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix PaywallScreenshotTests: drop native macOS destination

The screenshot tests only run on iOS simulator and Mac Catalyst —
there is no mac-native platform in the Fastfile. Including .mac triggered
a native macOS build of UnitTestsHostApp (deployment target 10.15) which
fails because @main/Scene require macOS 11.0+. Drop .mac and narrow the
deployment target to iOS 15.0 to match what the tests actually need.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Restore macOS deployment target for Mac Catalyst

Without an explicit macOS deployment target, Tuist leaves
MACOSX_DEPLOYMENT_TARGET unset and Xcode fills it with the current SDK
version (15.5), which is newer than the CI machine (15.3.2). macOS 12.0
is the correct minimum for Mac Catalyst paired with iOS 15.0.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix macOS deployment target for Mac Catalyst via raw build setting

Tuist 4.x rejects multiplatform(macOS:) without .mac in destinations,
and .mac breaks UnitTestsHostApp (macOS 10.15 + @main/Scene = error).
Using .iOS("15.0") alone leaves MACOSX_DEPLOYMENT_TARGET unset, and
Tuist/Xcode fills it with the current SDK version (15.5), which fails
on CI machines running an older macOS. Inject MACOSX_DEPLOYMENT_TARGET
= 12.0 directly as a raw build setting — correct minimum for Catalyst
paired with iOS 15.0, and bypasses Tuist's destination validator.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix test plan containerPaths for Tuist subdirectory projects

Tuist generates xcodeproj files inside Projects/*/  subdirectories,
so bare names like container:RevenueCatTests.xcodeproj cannot be
resolved from the workspace root. Using container: (empty) tells
Xcode to search the entire workspace for the target by its GUID,
which is the pattern used by all other Tuist-aware test plans.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Extend tuist-generate-workspace with include_test_dependencies param (#6751)

Adds an `include_test_dependencies` boolean parameter (default: false) to
the shared `tuist-generate-workspace` command, then uses it in the
screenshot job with `query: "PaywallScreenshotTests"` so only that project
is generated.

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix screenshot CI: drop query from tuist-generate-workspace

The Paywall-Screenshots.xctestplan references target GUIDs captured
from a full workspace generation. Using query: "PaywallScreenshotTests"
triggers targeted generation, which produces different GUIDs — xcodebuild
builds the scheme successfully but finds no test bundles because the GUID
in the test plan no longer matches the generated project.

Drop the query so tuist generate runs without a filter (full workspace),
matching what passed at pipeline 37463.

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>

* Fix screenshot CI with local PaywallScreenshotTests host app

---------

Co-authored-by: Claude Sonnet 4.6 <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants