CI phase 5: stricter eslint, design system integrity check, PR screenshots
CI / UI screenshots (before/after) (push) Skipped
CI / Security (npm audit) (push) Successful in 42s
CI / Test (jest) (push) Successful in 45s
CI / Integration (api) (push) Successful in 2m21s
CI / Scan (secrets, workflows, shell) (push) Successful in 2m35s
CI / Lint (eslint) (push) Successful in 20s
CI / Lint (eslint) (pull_request) Successful in 14s
CI / Test (jest) (pull_request) Successful in 24s
CI / Security (npm audit) (pull_request) Successful in 25s
CI / UI (playwright) (push) Successful in 2m20s
CI / Deploy (push) Skipped
CI / Deploy worker (push) Skipped
CI / Notify (push) Skipped
CI / Integration (api) (pull_request) Successful in 1m45s
CI / Scan (secrets, workflows, shell) (pull_request) Successful in 2m1s
CI / UI screenshots (before/after) (pull_request) Successful in 13s
CI / UI (playwright) (pull_request) Successful in 1m52s
CI / Deploy (pull_request) Skipped
CI / Deploy worker (pull_request) Skipped
CI / Notify (pull_request) Skipped

- eslint: errors for ==, unused or shadowed variables, eval and friends,
  prefer-const, curly, throw literals, useless catch/escape, constant
  conditions (loops allowed), unused expressions (short-circuit allowed);
  --max-warnings 0. Fixed the few violations (two unused requires in
  server.js, a shadowed mock argument in a test).
- Scan job: scripts/ci/check-web-template.sh fails if public/web_template
  differs from upstream at the commit in its VERSION (change it upstream,
  then scripts/sync-web-template.sh).
- New job UI screenshots (before/after), PRs only, when public/, views/
  or the render/nav code changed: runs the base branch and the PR side by
  side with the same seeded data and uploads one before/after image per
  page, desktop and phone (scripts/ci/screenshots.js). Not required.

Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
jaredandClaude Opus 5.5 committed 2026-11-22 20:04:02 -05:00
1 parent ad2e5313ea
commit 74eb525413
8 files changed
+270 -11

No files matched your search

+51
View File
@@ -121,6 +121,8 @@ jobs:
run: actionlint .gitea/workflows/*.yml
- name: Shell scripts (shellcheck)
run: git ls-files -z '*.sh' | xargs -0 shellcheck
- name: Vendored design system matches upstream
run: scripts/ci/check-web-template.sh
- name: Code patterns (semgrep)
# Rule packs come from the semgrep registry, so new rules can surface new
# findings: fix them, or suppress one line with `nosemgrep: <rule id>` and a reason.
@@ -167,6 +169,55 @@ jobs:
test-results/
retention-days: 14
ui-screenshots:
name: UI screenshots (before/after)
runs-on: ubuntu-latest
if: github.event_name == 'pull_request'
container: mcr.microsoft.com/playwright:v1.64.1-noble
env:
DB_HOST: 127.0.0.1
DB_PORT: '3306'
DB_NAME: pulse
DB_USER: pulse
DB_PASSWORD: ci-only
BASE_SHA: ${{ github.event.pull_request.base.sha }}
steps:
- uses: actions/checkout@11d5960a326750d5838078e36cf38b85af677262 # v4.4.0
with:
fetch-depth: 0
- name: Did this PR change the UI?
id: ui
run: |
if git diff --quiet "$BASE_SHA" HEAD -- public/ views/ lib/render.js lib/nav.js; then
echo "No UI files changed; no screenshots needed."
else
echo "changed=true" >> "$GITHUB_OUTPUT"
fi
- name: Start MariaDB
if: steps.ui.outputs.changed == 'true'
run: |
scripts/ci/mariadb.sh
mariadb -e "CREATE DATABASE pulse_base; GRANT ALL ON pulse_base.* TO 'pulse'@'127.0.0.1';"
- name: Start this PR's Pulse (port 8400)
if: steps.ui.outputs.changed == 'true'
run: npm ci && scripts/ci/ui-stack.sh start
- name: Start the base branch's Pulse (port 8401)
if: steps.ui.outputs.changed == 'true'
run: |
git worktree add /tmp/base "$BASE_SHA"
cd /tmp/base && npm ci
DB_NAME=pulse_base PULSE_UI_PORT=8401 scripts/ci/ui-stack.sh start
- name: Capture before/after screenshots
if: steps.ui.outputs.changed == 'true'
run: node scripts/ci/screenshots.js ui-screenshots before=http://127.0.0.1:8401 after=http://127.0.0.1:8400
- name: Upload screenshots
if: steps.ui.outputs.changed == 'true'
uses: actions/upload-artifact@c6a3b2bd78b3985e4b2f15397fec357f0fd808de # v3.2.2-node20 (v4 is unsupported on Gitea)
with:
name: ui-screenshots
path: ui-screenshots/
retention-days: 30
deploy:
name: Deploy
runs-on: ubuntu-latest