@cubiream/scintillator-cli
v0.0.2
Published
R2-native artifact management for Visual Regression Testing. No databases. No complex orchestration. Just storage.
Downloads
181
Readme
Scintillator CLI
R2-native artifact management for Visual Regression Testing. No databases. No complex orchestration. Just storage.
Installation
pnpm add -D @cubiream/scintillator-cliConfiguration
The CLI requires specific environment variables to authenticate with Cloudflare R2.
| Variable | Description |
| :--- | :--- |
| CF_ACCOUNT_ID | Your Cloudflare Account ID. |
| R2_ACCESS_KEY_ID | R2 Token Access Key ID. |
| R2_SECRET_ACCESS_KEY | R2 Token Secret Access Key. |
| R2_BUCKET | Target Bucket Name (Default: visual-regression-test). |
Execution
Restore
Downloads baseline images from R2 to the local environment. Required before running visual comparisons.
scintillator restore --bucket my-vrt-bucketUpload
Uploads the current build artifacts (actual screenshots) and generated diffs to R2.
Passes the current Commit SHA via GITHUB_SHA.
scintillator uploadUpdate
Promotes the current artifacts to be the new baseline.
Note: Strictly checks if GITHUB_REF matches the primary branch.
scintillator updateCI Integration
Designed to run inside GitHub Actions.
name: VRT
on: [push]
jobs:
test:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
# ... build steps ...
- name: Restore Baseline
run: npx scintillator restore
env:
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}
- name: Run Visual Tests
run: pnpm exec lost-pixel # or your preferred tool
- name: Upload Artifacts
if: always()
run: npx scintillator upload
env:
CF_ACCOUNT_ID: ${{ secrets.CF_ACCOUNT_ID }}
R2_ACCESS_KEY_ID: ${{ secrets.R2_ACCESS_KEY_ID }}
R2_SECRET_ACCESS_KEY: ${{ secrets.R2_SECRET_ACCESS_KEY }}License
MIT
