Skip to content

ci: Run iOS simulator tests in parallel - #982

Merged
marandaneto merged 1 commit into
PostHog:mainfrom
philippsuess:ci/parallelize-ios-simulator-tests
Oct 28, 2026
Merged

marandaneto merged 1 commit into
PostHog:mainfrom
philippsuess:ci/parallelize-ios-simulator-tests

Conversation

@philippsuess

@philippsuess philippsuess commented Oct 28, 2026 •

Copy link
Copy Markdown
Contributor

💡 Motivation and Context

test-ios-simulator ran three independent make targets one after another on a single runner, taking 24–38 minutes on recent main runs (e.g. run 40654985085: 22 + 6 + 8 min of test steps, 38 min total). Each target already does its own full xcodebuild (different scheme, configuration or compile flags), so nothing is shared between them.

This splits them into a matrix of three parallel jobs, so wall time becomes the longest job instead of the sum (about 17–22 min instead of 31–38):

  • test-ios-simulator (unit tests) → make testOniOSSimulator
  • test-ios-simulator (survey UI) → make testSurveyUI
  • test-ios-simulator (presentation masks) → make testPresentationMasks

Notes for reviewers:

  • Required check name is preserved. The repo ruleset requires a check named test-ios-simulator. A new test-ios-simulator job now aggregates the matrix (needs + if: always(), fails unless the matrix result is success), so no ruleset change is needed.
  • Log artifacts are split per job (ios-test-logs-unit, -survey-ui, -presentation-masks) since artifact names must be unique. Nothing else references ios-test-logs.
  • The flaky (retried) test report only runs in the unit tests job, the only one that retries.
  • Markdown-only PRs behave as before: every job echoes and passes.

💚 How did you test it?

CI only. Maintainers: workflow runs on this PR and on the test PRs below need your approval. The test PRs are draft, DO NOT MERGE, and are closed once validated.

📝 Checklist

  • All commits are signed (see Commit signing)
  • I reviewed the submitted code.
  • I added tests to verify the changes.
  • I updated the docs if needed.
  • No breaking change or entry added to the changelog.

🤖 Agent context

Autonomy: Human-driven (agent-assisted)

Written with Claude Code. I analyzed the slow run's per-step timings, compared the workflow with how getsentry/sentry-cocoa structures its test jobs (matrix of parallel jobs), and chose the matrix split as the biggest low-risk win. Faster runners, simulator boot overlap and compile caching were considered and left out of this PR.

🤖 Generated with Claude Code

Co-Authored-By: Claude Sonnet 5.5 <noreply@anthropic.com>
@philippsuess
philippsuess marked this pull request as ready for review October 28, 2026 10:48
@philippsuess
philippsuess requested a review from a team as a code owner October 28, 2026 10:48
@philippsuess philippsuess changed the title ci: run iOS simulator test suites in parallel ci: Run iOS simulator tests in parallel Oct 28, 2026

@marandaneto marandaneto left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

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

The code looks good; no qualifying findings. Verdict: correct.

@marandaneto
marandaneto enabled auto-merge (squash) October 28, 2026 11:05
@marandaneto

Copy link
Copy Markdown
Member

makes sense

@marandaneto
marandaneto merged commit c8fcd8b into PostHog:main Oct 28, 2026
53 of 56 checks passed
@philippsuess
philippsuess deleted the ci/parallelize-ios-simulator-tests branch October 28, 2026 11:58
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