mirror of
https://github.com/PR0M3TH3AN/bitvid.git
synced 2026-10-31 09:52:24 +00:00
ci: run visual regression in its own job (don't gate deploy on it)
The visual-regression step lived inside the build job, and deploy-cache-state (the Cloudflare CDN cache-purge that makes new content visible) needs: build. So an environment-sensitive pixel diff — CI's Chromium/font rendering differs from the committed baseline (locally the baseline is byte-identical, so it's not a content regression) — failed the build job and silently blocked every deploy. The unstable.bitvid.network CDN was stuck on the 2026-06-17 build as a result. Move the visual steps into a standalone visual-regression job so they still run and report a failure, but no longer block the build job or the deploy. Real lint/build/artifact failures still gate the deploy via build. Co-Authored-By: Claude Opus 4.8 <[email protected]>
This commit is contained in:
1 parent
9a48c59953
commit
73a06069ad
1 file changed
+48
@@ -89,6 +89,54 @@ jobs:
|
||||
path: artifacts/dist-hashes-current.json
|
||||
if-no-files-found: error
|
||||
|
||||
|
||||
# Visual regression runs as its own job so an environment-sensitive pixel diff
|
||||
# (CI Chromium/font rendering can differ from the committed baseline) reports a
|
||||
# failure WITHOUT blocking the build job — and therefore without blocking the
|
||||
# deploy-cache-state CDN purge below. Real build/lint failures still gate the
|
||||
# deploy via the build job.
|
||||
visual-regression:
|
||||
runs-on: ubuntu-latest
|
||||
timeout-minutes: 30
|
||||
strategy:
|
||||
matrix:
|
||||
node-version: [22]
|
||||
|
||||
steps:
|
||||
- name: Check out repository
|
||||
uses: actions/checkout@v4
|
||||
with:
|
||||
fetch-depth: 0
|
||||
|
||||
- name: Set up Node.js ${{ matrix.node-version }}
|
||||
uses: actions/setup-node@v4
|
||||
with:
|
||||
node-version: ${{ matrix.node-version }}
|
||||
|
||||
- name: Cache npm directory
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: ~/.npm
|
||||
key: ${{ runner.os }}-node-${{ matrix.node-version }}-npm-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ matrix.node-version }}-npm-
|
||||
|
||||
- name: Cache node_modules
|
||||
id: node-modules-cache
|
||||
uses: actions/cache@v4
|
||||
with:
|
||||
path: node_modules
|
||||
key: ${{ runner.os }}-node-${{ matrix.node-version }}-modules-${{ hashFiles('package-lock.json') }}
|
||||
restore-keys: |
|
||||
${{ runner.os }}-node-${{ matrix.node-version }}-modules-
|
||||
|
||||
- name: Install dependencies
|
||||
if: steps.node-modules-cache.outputs.cache-hit != 'true'
|
||||
run: npm ci
|
||||
|
||||
- name: Install Playwright browsers
|
||||
run: npx playwright install --with-deps chromium
|
||||
|
||||
- name: Run visual regression tests
|
||||
id: visual
|
||||
run: npm run test:visual
|
||||
|
||||
Reference in new issue
Block a user