Quality gates / quality (pull_request) Successful in 2m53s
Field finding #67: a hard/lumpy (Bristol 1-2) entry now asks a short follow-up before saving — difficult to pass, soreness, visible red blood, truly black/sticky/tarry versus dark brown, and dehydration. Every answer is user-reported and starts unanswered; nothing is inferred from the photo, and answering "dark brown" never silently escalates as black stool. A confirmed red-flag answer writes the same symptom flag manual logging already uses, so the existing deterministic escalation is the only escalation path. Mild reports get concise non-diagnostic self-care that states the photo cannot rule out bleeding, and it is withdrawn whenever a red flag is confirmed. - src/followup.js: pure follow-up contract (9 unit tests, tests/followup.test.js) - app.js + styles.css: follow-up block on the safety step for Type 1-2 entries only - tests/followup.acceptance.mjs: browser acceptance incl. that the AI suggestion surface still contains no symptom wording - CI + release builder gates: npm run test:followup, syntax checks, manifest gate - scripts/record_release_demo.mjs: records the real follow-up, mild guidance, and the black/tarry alert handoff with synthetic data
66 lines
1.7 KiB
YAML
66 lines
1.7 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:photo
|
|
npm run test:mobile-capture
|
|
npm run test:sleek
|
|
npm run test:manual-fallback
|
|
npm run test:provisional
|
|
npm run test:followup
|
|
- 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
|