This repository was archived by the owner on Jan 28, 2026. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
Integration Patterns
amandaxmqiu edited this page Jul 25, 2025
·
5 revisions
This guide shows various ways to integrate the GUI-Based Testing Code Review action with your existing CI/CD pipelines.
- [Basic Patterns]
- [Advanced Patterns]
- [Framework Integration]
- [Performance Optimization]
- [Enterprise Patterns]
The easiest way to get started:
name: GUI Test Review
on:
pull_request:
branches: [main]
jobs:
test-and-review:
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # For comparison
- uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
enable-visual-comparison: 'true'Add visual review to your current tests:
name: CI Pipeline
on: [pull_request, push]
jobs:
# Your existing test job
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-node@v4
- run: npm ci
- run: npm test
# Generate Playwright report
- run: npx playwright test --reporter=json
# Upload for dashboard
- uses: actions/upload-artifact@v4
with:
name: test-results
path: |
playwright-report/
test-results/
playwright-metrics.json
# Add visual dashboard
visual-review:
needs: test
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1
with:
mode: 'dashboard-only'
custom-artifacts-path: '.'Run components in parallel:
name: Parallel CI
on: [pull_request]
jobs:
lint:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1
with:
mode: 'lint-only'
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0
- uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1
with:
mode: 'test-only'
enable-visual-comparison: 'true'
dashboard:
needs: [lint, test]
runs-on: ubuntu-latest
permissions:
contents: read
pull-requests: write
pages: write
id-token: write
steps:
- uses: actions/checkout@v4
- uses: actions/download-artifact@v4
- uses: DigitalProductInnovationAndDevelopment/Code-Reviews-of-GUI-Tests@v1
with:
mode: 'dashboard-only'- ✅ Use
fetch-depth: 0for visual comparison - ✅ Set appropriate permissions for your needs
- ✅ Cache dependencies for faster runs
- ✅ Use matrix strategies for comprehensive testing
- ✅ Implement smart retries for flaky tests
- ❌ Run all tests on every commit (use path filters)
- ❌ Ignore security warnings from npm audit
- ❌ Use
fail-on-test-failure: truewithout retry logic - ❌ Forget to clean up resources (Docker, servers, etc.)
- Use GitHub's larger runners for heavy test suites
- Parallelize independent test suites
- Cache everything possible (dependencies, browsers, build outputs)
- Use shallow clones when comparison isn't needed
- Consider test sharding for very large suites