From 73a06069adfcb9acfe7717eaf0f9dfc308a19825 Mon Sep 17 00:00:00 2001 From: thePR0M3TH3AN <53631862+PR0M3TH3AN@users.noreply.github.com> Date: Sat, 20 Jun 2026 13:16:11 -0400 Subject: [PATCH] ci: run visual regression in its own job (don't gate deploy on it) MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 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 --- .github/workflows/ci.yml | 48 ++++++++++++++++++++++++++++++++++++++++ 1 file changed, 48 insertions(+) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 1f59a616..7afefa30 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -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