timmy-talking-turd/.gitea/workflows/quality.yml
Timmy ae9fe0173c
Some checks failed
Quality gates / quality (pull_request) Failing after 2m25s
a11y: WCAG/mobile fixes and deterministic visual gates (Closes #14)
Strict RED-GREEN per defect, verified in a real browser:

- Nav buttons expose accessible names ('Today navigation item') and
  the active view carries aria-current=page
- Urgent red-flag box is an assertive role=alert live region so screen
  readers announce 'Pause and get medical help' the moment a red-flag
  symptom is checked
- Log sheet dismisses on Escape (keyboard path out of the modal)
- --muted darkened #756e68 -> #6a635c: muted text now meets WCAG AA
  4.5:1 on paper, surface, and soft backgrounds
- New npm run test:a11y gates (Playwright, mobile viewport):
  landmarks/labels/focus-ring/touch-targets/reduced-motion,
  urgent-alert announcement + dialog semantics, token contrast math
  and 200% text-zoom resilience; each writes a synthetic screenshot
  to artifacts/a11y-*.png for human inspection
- CI runs test:a11y and uploads the screenshots as artifacts
- sleek-chat selector updated to the new accessible nav name

Privacy/safety paths unchanged: local-first storage, consent-gated AI,
deterministic urgent override all still pass existing suites.
2026-08-22 23:18:04 +00:00

74 lines
2.0 KiB
YAML

name: Quality gates
on:
push:
branches: [main]
pull_request:
branches: [main]
permissions:
contents: read
jobs:
quality:
runs-on: ubuntu-latest
timeout-minutes: 15
steps:
- name: Check out source
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Set up Node.js
uses: actions/setup-node@v4
with:
node-version: 22
cache: npm
- name: Install reproducibly
run: |
npm ci
python3 -m pip install --break-system-packages -r requirements-test.txt
- name: Install browser
run: npx playwright install --with-deps chromium
- name: Unit and security tests
run: |
npm test
python3 tests/staging-deploy.test.py -v
- name: Mobile browser acceptance
run: |
npm start > /tmp/timmy-server.log 2>&1 &
server_pid=$!
trap 'kill "$server_pid"' EXIT
for attempt in $(seq 1 30); do
if curl --fail --silent http://127.0.0.1:4173/ > /dev/null; then
break
fi
if [ "$attempt" -eq 30 ]; then
cat /tmp/timmy-server.log
exit 1
fi
sleep 1
done
npm run test:ui
npm run test:a11y
npm run test:photo
npm run test:sleek
- name: Upload accessibility screenshots
uses: actions/upload-artifact@v4
if: always()
with:
name: a11y-screenshots
path: |
artifacts/a11y-journal-mobile.png
artifacts/a11y-privacy-mobile.png
artifacts/a11y-redflag-alert.png
artifacts/a11y-zoom-home.png
if-no-files-found: ignore
- name: Dependency audit
run: npm audit --audit-level=high
- name: Syntax checks
run: |
npm run check:syntax
node --check tests/staging.acceptance.mjs
- name: Diff hygiene
run: npm run check:diff