Skip to content

perf(ci): run unit-tests in parallel with build in frontend-pr-workflow#231

Merged
kb-typeform merged 1 commit intomainfrom
test/unit-tests-no-build-dep
Apr 23, 2026
Merged

perf(ci): run unit-tests in parallel with build in frontend-pr-workflow#231
kb-typeform merged 1 commit intomainfrom
test/unit-tests-no-build-dep

Conversation

@kb-typeform
Copy link
Copy Markdown
Contributor

@kb-typeform kb-typeform commented Apr 23, 2026

Summary

  • Removes needs: build from the unit-tests job in frontend-pr-workflow.yml.
  • unit-tests does not consume the build artifact (no Download Build Artifacts step, no needs.build.outputs.* reference) and already re-runs any required codegen in pre-test-command. The dependency only serialized the pipeline for no functional gain.
  • After this change, unit-tests runs in parallel with build, shortening PR feedback time.

Scope

Investigated all 32 frontend repos migrated to the unified CI pipeline (PLT-2547):

  • 18 repos actively benefit — jest-only test suites or pre-test-command: yarn generate that is self-contained (smart-forms-builder, audiences-page, admin-panel, followups-manager, typeform-ai, authbridge-fe, auth-page, boombox-fe, cha-ching, hall-of-forms, paprikations, typekit-app-directory, share-web, workflows, results, integrations-panel, chief, demo-app).
  • 10 repos unaffected — don't call this workflow, or don't run unit tests via it.
  • 4 repos with workspace-aware pre-test — admin-template-gallery, brand-kit-frontend, app-shell, performance-analytics. All handle their test prereqs via pre-test-command independently of the build job, so removing the dep is safe.

Validation

End-to-end test against performance-analytics (the repo with the most complex pre-test — Turbo workspace rebuilds + GraphQL codegen):

  • Pointed Typeform/performance-analytics#2008 at @test/unit-tests-no-build-dep.
  • Unit Tests started 14:17:08; Build started 14:17:18 — parallel execution confirmed.
  • Unit Tests completed in 6m44s (while Build took 3m48s).
  • No Turbo cache contention or codegen ordering issues observed.

Time savings on this PR: ~3m48s on the unit-tests critical path (equal to the full build duration, because unit-tests > build here). For repos where unit-tests < build, savings equal the unit-tests duration on any path that gates on unit-tests completion (e.g. SonarCloud, which currently needs: [build, unit-tests]).

Flakes observed during validation were pre-existing (intermittent GraphQL schema fetches, Playwright timeouts) and reproduce on unmodified PRs.

Test plan

  • Validated against performance-analytics with end-to-end rerun
  • Confirmed Unit Tests starts before Build in parallel mode
  • Monitor next-day CI for regression reports across affected repos

  • This PR only changes an existing workflow.
  • This PR adds a new workflow that is needed in a public Typeform repository.

🤖 Generated with Claude Code

Unit tests don't consume the build artifact and re-run any codegen
via pre-test-command, so needs: build only serialized the pipeline.
Removing it lets unit-tests run in parallel with build for faster PR
feedback.

This is a test branch for validating the change against
performance-analytics (the one repo where Turbo cache warmup could
interact with parallel execution).

Co-Authored-By: Claude Opus 4.7 <noreply@anthropic.com>
@sonarqubecloud
Copy link
Copy Markdown

@kb-typeform kb-typeform changed the title test: remove needs: build from unit-tests job perf(ci): run unit-tests in parallel with build in frontend-pr-workflow Apr 23, 2026
@kb-typeform kb-typeform marked this pull request as ready for review April 23, 2026 15:02
@kb-typeform kb-typeform requested a review from a team as a code owner April 23, 2026 15:02
@gitstream-cm
Copy link
Copy Markdown

gitstream-cm Bot commented Apr 23, 2026

This PR is missing a Jira ticket reference in the title or description.
Please add a Jira ticket reference to the title or description of this PR.

@gitstream-cm
Copy link
Copy Markdown

gitstream-cm Bot commented Apr 23, 2026

🥷 Code experts: no user but you matched threshold 10

kb-typeform, zdenekkostal have most 👩‍💻 activity in the files.
kb-typeform has most 🧠 knowledge in the files.

See details

.github/workflows/frontend-pr-workflow.yml

Activity based on git-commit:

kb-typeform zdenekkostal
APR 4 additions & 0 deletions 41 additions & 1 deletions
MAR 65 additions & 28 deletions
FEB 273 additions & 92 deletions
JAN
DEC 458 additions & 16 deletions
NOV

Knowledge based on git-blame:
kb-typeform: 92%

✨ Comment /gs review for LinearB AI review. Learn how to automate it here.

@kb-typeform kb-typeform merged commit 532e300 into main Apr 23, 2026
14 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants