How to Store Visual Baselines With reg-suit and S3 in CI
reg-suit stores expected images in an S3 bucket instead of git, downloading the baseline for the base commit and uploading a diff report each run.
Configure reg-publish-s3-plugin in regconfig.json, provide AWS credentials as secrets, and run reg-suit run so baselines live in S3 rather than the repo.
Steps
- Install
reg-suitandreg-publish-s3-plugin. - Set the bucket in
regconfig.json. - Provide
AWS_ACCESS_KEY_IDandAWS_SECRET_ACCESS_KEYsecrets. - Run
reg-suit runafter generating actual images.
regconfig.json
regconfig.json
{
"core": { "workingDir": ".reg", "actualDir": "actual" },
"plugins": {
"reg-publish-s3-plugin": { "bucketName": "my-visual-baselines" }
}
}Workflow
.github/workflows/ci.yml
jobs:
visual:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- run: npm ci && npm run capture-screenshots
- run: npx reg-suit run
env:
AWS_ACCESS_KEY_ID: ${{ secrets.AWS_ACCESS_KEY_ID }}
AWS_SECRET_ACCESS_KEY: ${{ secrets.AWS_SECRET_ACCESS_KEY }}Gotchas
- reg-suit keys baselines by commit hash; a shallow clone breaks base-commit lookup.
- The IAM policy must allow both read and write on the bucket prefix.
Related guides
How to Choose Between Git and Cloud Baseline Storage for Visual TestsCompare storing visual baselines in git versus a cloud service, weighing repo bloat, review workflow, and cro…
How to Set Up Applitools Eyes in CIAdd Applitools Eyes visual AI checks to CI by wrapping test steps with eyes.open, eyes.check, and eyes.close,…