01
Test the preview, not localhost
The suite runs against the real preview deployment - same build output, same edge config, same environment your users would get if the PR merged. What gets tested is exactly what ships.
CI/CD
Vercel builds a preview for every pull request - Lastest tests it. The GitHub Action fires when the preview is ready, points your recorded suite at the preview URL, diffs every screen against the production baseline, and blocks the merge until you approve what changed. Deterministic replays, $0 in AI tokens per run.
What you get
01
The suite runs against the real preview deployment - same build output, same edge config, same environment your users would get if the PR merged. What gets tested is exactly what ships.
02
Vercel emits a GitHub deployment_status event when the preview goes live. The workflow fires on success, passes the preview URL to Lastest, and the run starts within seconds of the deploy - no polling, no sleep steps.
03
With fail-on-changes enabled and the Lastest check added to branch protection, a PR with unapproved visual changes cannot merge. Approve the diff in the review UI and the check goes green.
How it works
Diagram 1 · Preview-deploy trigger
Diagram 2 · Preview vs production baseline
Diagram 3 · Merge gate
Configure
GitHub Actions - run the suite when the Vercel preview is live
name: Visual tests on Vercel preview
on:
deployment_status:
jobs:
visual:
if: github.event.deployment_status.state == 'success'
runs-on: ubuntu-latest
steps:
- uses: las-team/lastest/action@main
with:
server-url: ${{ secrets.LASTEST_SERVER_URL }}
runner-token: ${{ secrets.LASTEST_RUNNER_TOKEN }}
preview-url: ${{ github.event.deployment_status.environment_url }}
fail-on-changes: 'true'