CI Integration
Add visual regression testing to your CI pipeline with a few lines.
The simplest integration uses the packaged PixelEagle-cli composite action, which installs the CLI and runs the full create-upload-compare flow in one step:
- name: PixelEagle
uses: vleue/PixelEagle-cli/run@v0.3.0
with:
token: ${{ secrets.PIXEL_EAGLE_TOKEN }}
screenshots-path: test-screenshots
metadata: '{"commit": "${{ github.sha }}", "branch": "${{ github.ref_name }}"}'
compare-filter: branch:main For more control, use the install action and drive the CLI yourself:
- uses: vleue/PixelEagle-cli/install@v0.3.0
- name: Upload & compare screenshots
env:
PIXEL_EAGLE_TOKEN: ${{ secrets.PIXEL_EAGLE_TOKEN }}
run: |
RUN_ID=$(pixeleagle-cli new-run --metadata '{"commit": "${{ github.sha }}", "branch": "${{ github.ref_name }}"}')
pixeleagle-cli upload-screenshots $RUN_ID test-screenshots/*.png
pixeleagle-cli compare-run $RUN_ID --filter branch:main --wait --print-detailsOr skip the action entirely and install from the release script — useful if you can't use third-party actions:
- name: Install PixelEagle CLI
run: curl -fsSL https://pixel-eagle.com/install.sh | sh
- name: Upload & compare screenshots
env:
PIXEL_EAGLE_TOKEN: ${{ secrets.PIXEL_EAGLE_TOKEN }}
run: |
RUN_ID=$(./pixeleagle new-run --metadata '{"commit": "${{ github.sha }}", "branch": "${{ github.ref_name }}"}')
./pixeleagle upload-screenshots $RUN_ID test-screenshots/*.png
./pixeleagle compare-run $RUN_ID --filter branch:main --wait --print-details