Skip to content

ci: add preview smoke test for frontend PRs#7192

Open
talissoncosta wants to merge 5 commits intomainfrom
ci/frontend-smoke-test-on-vercel-preview
Open

ci: add preview smoke test for frontend PRs#7192
talissoncosta wants to merge 5 commits intomainfrom
ci/frontend-smoke-test-on-vercel-preview

Conversation

@talissoncosta
Copy link
Copy Markdown
Contributor

@talissoncosta talissoncosta commented Apr 9, 2026

  • I have read the Contributing Guide.
  • I have added information to docs/ if required so people know about the feature.
  • I have filled in the "Changes" section below.
  • I have filled in the "How did you test this code" section below.

Changes

Contributes to #7178

After the Vercel preview returned 500 on a recent PR while all CI checks passed, this adds a simple smoke test to the PR workflow that validates Vercel preview deployments are healthy before merging.

What it does

Adds a smoke-test job to frontend-pull-request.yml that:

  1. Waits for Vercel preview deployments to complete (polls the GitHub Deployments API)
  2. Checks three endpoints return HTTP 200:
    • /health
    • /config/project-overrides
    • / (index page)

Checks both preview environments (flagsmith-frontend-preview and flagsmith-frontend-staging). Times out gracefully if a deployment doesn't appear within 10 minutes.

Why this approach

This is intentionally simple — just HTTP status checks, no E2E or browser tests. The goal is to catch deployment failures (500s, build errors, broken Express server) that unit tests can't detect. If we want more coverage later, we can build on this.

What changed

  • .github/workflows/frontend-pull-request.yml — Added deployments: read permission and smoke-test job

How did you test this code?

Triggered the workflow via workflow_dispatch on this branch and verified the smoke test job runs against the Vercel preview URLs. Will validate on this PR once Vercel deploys the preview.

@vercel
Copy link
Copy Markdown

vercel bot commented Apr 9, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
flagsmith-frontend-preview Ready Ready Preview, Comment Apr 10, 2026 1:09pm
flagsmith-frontend-staging Ready Ready Preview, Comment Apr 10, 2026 1:09pm
1 Skipped Deployment
Project Deployment Actions Updated (UTC)
docs Ignored Ignored Preview Apr 10, 2026 1:09pm

Request Review

@github-actions github-actions bot added ci-cd Build, test and deployment related front-end Issue related to the React Front End Dashboard and removed ci-cd Build, test and deployment related labels Apr 9, 2026
@github-actions github-actions bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Apr 9, 2026
@codecov
Copy link
Copy Markdown

codecov bot commented Apr 9, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 98.35%. Comparing base (9e3edac) to head (b52e839).
⚠️ Report is 4 commits behind head on main.

Additional details and impacted files
@@           Coverage Diff           @@
##             main    #7192   +/-   ##
=======================================
  Coverage   98.35%   98.35%           
=======================================
  Files        1348     1348           
  Lines       50691    50691           
=======================================
  Hits        49859    49859           
  Misses        832      832           

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.
  • 📦 JS Bundle Analysis: Save yourself from yourself by tracking and limiting bundle sizes in JS merges.

@talissoncosta talissoncosta changed the title ci: Add Vercel preview smoke test for frontend PRs ci: Stage Vercel deployment and run E2E before promoting to production Apr 9, 2026
@github-actions github-actions bot removed the ci-cd Build, test and deployment related label Apr 9, 2026
@github-actions github-actions bot added the ci-cd Build, test and deployment related label Apr 9, 2026
talissoncosta and others added 4 commits April 10, 2026 10:06
Adds a CI job that waits for Vercel preview deployments to complete,
then curls /health, /config/project-overrides, and / to verify they
return 200. This catches server-side failures (like the missing
index.handlebars in #7178) that the existing E2E and unit tests
don't cover because they don't exercise the Vercel serverless path.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Trivial comment to ensure Vercel deploys a preview so the new smoke
test job can run against it. Will be removed before merging.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Temporary change to validate the workflow works.

Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@talissoncosta talissoncosta force-pushed the ci/frontend-smoke-test-on-vercel-preview branch from 8281d0d to d10f1e5 Compare April 10, 2026 13:06
@github-actions github-actions bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Apr 10, 2026
Co-Authored-By: Claude Opus 4.6 (1M context) <noreply@anthropic.com>
@talissoncosta talissoncosta changed the title ci: Stage Vercel deployment and run E2E before promoting to production ci: Add Vercel preview smoke test for frontend PRs Apr 10, 2026
@github-actions github-actions bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Apr 10, 2026
@talissoncosta talissoncosta marked this pull request as ready for review April 10, 2026 13:14
@talissoncosta talissoncosta requested a review from a team as a code owner April 10, 2026 13:14
@talissoncosta talissoncosta requested review from Zaimwa9 and removed request for a team April 10, 2026 13:14
Copy link
Copy Markdown

@claude claude bot left a comment

Choose a reason for hiding this comment

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

⚠️ Code review skipped — your organization's overage spend limit has been reached.

Code review is billed via overage credits. To resume reviews, an organization admin can raise the monthly limit at claude.ai/admin-settings/claude-code.

Once credits are available, reopen this pull request to trigger a review.

@github-actions github-actions bot added ci-cd Build, test and deployment related and removed ci-cd Build, test and deployment related labels Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

Docker builds report

Image Build Status Security report
ghcr.io/flagsmith/flagsmith-api-test:pr-7192 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-e2e:pr-7192 Finished ✅ Skipped
ghcr.io/flagsmith/flagsmith-api:pr-7192 Finished ✅ Results
ghcr.io/flagsmith/flagsmith:pr-7192 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-private-cloud:pr-7192 Finished ✅ Results
ghcr.io/flagsmith/flagsmith-frontend:pr-7192 Finished ✅ Results

@talissoncosta talissoncosta changed the title ci: Add Vercel preview smoke test for frontend PRs ci: add preview smoke test for frontend PRs Apr 10, 2026
@github-actions
Copy link
Copy Markdown
Contributor

github-actions bot commented Apr 10, 2026

Playwright Test Results (oss - depot-ubuntu-latest-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  47.2 seconds
commit  b52e839
info  🔄 Run: #15965 (attempt 1)

Playwright Test Results (oss - depot-ubuntu-latest-arm-16)

passed  11 passed

Details

stats  11 tests across 8 suites
duration  28.3 seconds
commit  b52e839
info  🔄 Run: #15965 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-arm-16)

passed  17 passed

Details

stats  17 tests across 14 suites
duration  59.6 seconds
commit  b52e839
info  🔄 Run: #15965 (attempt 1)

Playwright Test Results (private-cloud - depot-ubuntu-latest-16)

passed  1 passed

Details

stats  1 test across 1 suite
duration  52.5 seconds
commit  b52e839
info  🔄 Run: #15965 (attempt 1)

@github-actions
Copy link
Copy Markdown
Contributor

Visual Regression

16 screenshots compared. See report for details.
View full report

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

Labels

ci-cd Build, test and deployment related front-end Issue related to the React Front End Dashboard

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants