Visual testing in every GitHub Actions workflow
Catch UI regressions on every pull request with automated screenshots
Add screenshot capture to your GitHub Actions CI/CD pipeline. Automatically capture screenshots of preview deployments on every PR, compare them against baselines, and catch visual regressions before they reach production.
Add workflow file
Create a .github/workflows/screenshots.yml file in your repository.
Store your API key
Add your Allscreenshots API key as a GitHub repository secret.
Capture on PR
Use curl in a workflow step to capture screenshots of your preview deployment.
Upload as artifacts
Store screenshots as GitHub Actions artifacts for review and comparison.
1name: Visual Regression Tests
2on:
3 pull_request:
4 branches: [main]
5
6jobs:
7 screenshots:
8 runs-on: ubuntu-latest
9 steps:
10 - uses: actions/checkout@v4
11
12 - name: Capture Screenshots
13 run: |
14 curl -X POST 'https://api.allscreenshots.com/v1/screenshot' \
15 -H 'Authorization: Bearer ${{ secrets.SCREENSHOT_API_KEY }}' \
16 -H 'Content-Type: application/json' \
17 -d '{
18 "url": "https://preview-${{ github.event.number }}.yourapp.com",
19 "fullPage": true,
20 "viewport": { "width": 1920, "height": 1080 }
21 }' -o screenshot.png
22
23 - name: Upload Screenshot
24 uses: actions/upload-artifact@v4
25 with:
26 name: screenshots
27 path: screenshot.pngNo browser setup
Skip installing Puppeteer or Playwright in your CI. One API call captures any page.
Fast and reliable
Screenshots are captured on Allscreenshots' infrastructure, not your CI runner. No flaky browser tests.
PR-level visibility
Attach screenshots as artifacts to every PR for easy visual review.
Read the full tutorial
Step-by-step guide to integrating Allscreenshots with GitHub Actions, including advanced options and best practices.
Read the blog postPricing that scales with you
No hidden fees. No surprises. Just screenshots.
100 free screenshots on sign-up · 50 bonus for each friend you invite
Pro
- 7,500 screenshots/mo
- 100/min rate limit
- $0.009 overage
- All features included
Business
- 30,000 screenshots/mo
- 200/min rate limit
- $0.0075 overage
- All features included
Enterprise
- 100,000 screenshots/mo
- 400/min rate limit
- $0.005 overage
- All features included