Continuous Baselines (Hybrid)
The high-efficiency workflow: Automated updates on merge combined with static baselines for speed and maximum reliability.
The Efficiency Play
The Continuous Baseline model is a hybrid between live comparisons (Preview vs Production) and Managed Baselines. It provides the zero-maintenance automation of "Preview vs. Prod" with the speed and cost-savings of static S3 images.
2x Faster
Compare PRs against S3 images instead of rendering a live production site every time.
50% Cheaper
Only one browser instance is needed per test, cutting your Lambda execution time in half.
Rock Solid
Eliminate flakiness caused by slow production servers, animations, or CDN caching issues.
How it Works
PR Phase: Fast Checks
Pull Requests compare the Preview URL against the existing S3 Baselines. The CI check simply ensures that developers are aware of visual changes, but does not block merging if the visual changes are expected.
Merge Phase: Automated Seal
Once code hits main, a GitHub Action captures the new look of the live site and uses the --auto-approve flag to automatically seal it as the new "Golden Image" baseline for all future PRs.
Implementation Guide
This setup requires two distinct workflows: one to check PRs, and one to update baselines automatically on merge.
1. The PR Check (Speed Optimized)
# Triggered on Pull Request
uses: regressionbot/action@v1
with:
command: 'check'
api-key: ${{ secrets.REGRESSIONBOT_API_KEY }}
project: 'my-app'
test-origin: ${{ steps.preview.outputs.url }}
# NOTICE: base-origin is omitted to rely on Managed Baselines2. The Baseline Update (On Merge)
# Triggered on Push to Main
uses: regressionbot/action@v1
with:
command: 'check'
api-key: ${{ secrets.REGRESSIONBOT_API_KEY }}
project: 'my-app'
test-origin: 'https://myapp.com' # Production URL
auto-approve: true # Capture and seal in one go