Skip to content

ci: add GitHub Actions test workflow + README badge#2

Merged
abk1969 merged 1 commit into
mainfrom
chore/ci-tests
May 10, 2026
Merged

ci: add GitHub Actions test workflow + README badge#2
abk1969 merged 1 commit into
mainfrom
chore/ci-tests

Conversation

@abk1969
Copy link
Copy Markdown
Owner

@abk1969 abk1969 commented May 10, 2026

Summary

Adds CI for the 49-test Vitest suite landed in #1 so it runs automatically on every push to `main` and every PR — without it the suite is only as protective as people remembering to run `npm test`.

What changed

  • `.github/workflows/test.yml` — runs `npm ci` → `npm run test:coverage` → `npm run build` on Ubuntu, Node 20 (matches the Dockerfile build stage). 5 min timeout. Concurrency group cancels superseded runs on the same branch.
  • `README.md` — adds a tests badge linked to the workflow page.

Verification

This PR itself is the smoke test — if the badge goes green, the workflow works.

🤖 Generated with Claude Code

Runs npm ci, npm run test:coverage, npm run build on every push to main and
every pull request. Node 20 matches the Dockerfile build stage. Concurrency
group cancels superseded runs on the same branch. README gets a tests badge.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
@abk1969 abk1969 merged commit 88f0bcc into main May 10, 2026
1 check passed
@abk1969 abk1969 deleted the chore/ci-tests branch May 10, 2026 16:11
abk1969 added a commit that referenced this pull request May 16, 2026
Bug #1 (critical) — Step 7 systemic-risk question was hidden for art. 25 flip
  Integrators flipping to provider via substantialModification='oui' could
  never reach GPAI_RS classification because Step 7's gpaiQuestionApplicable
  check only matched nature==='gpai'. Now also matches the flip path:
  nature==='systeme_sur_gpai' && substantialModification==='oui'. canNext
  updated symmetrically. The classifier already supported GPAI_RS for the
  flip path (PR #3 D1) — this UI fix makes that path reachable.

Bug #2 (important) — Prohibition short-circuit ignored carve-out claims
  goToResultIfProhibited jumped to verdict on ANY prohibition selection,
  bypassing Annex I/III/50/GPAI steps. A user with prohibition (h) +
  art. 5(2)-(3) carve-out claim would land on RISQUE_MINIMAL without
  ever being asked about Annex III §1 biometrics. Now short-circuits only
  if at least one selected prohibition has no claimed-and-matched carve-out.

Bug #3 (copy) — q7Sub / q7NotApplicable mentioned only GPAI providers
  Updated EN+FR to acknowledge the art. 25 flip path so the "not applicable"
  message no longer contradicts a flipped integrator's status.

UX note — added a cumulativity rappel to q5Sub
  Reminds the user that art. 5 prohibitions (step 3), Annex III §1 (step 5),
  and art. 50 transparency (step 6) are cumulative — same underlying tech
  may need ticking in multiple steps because each tests a distinct legal
  regime.

Tests + build green at 113/113.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
abk1969 added a commit that referenced this pull request May 16, 2026
Closes the last TDD audit recommendation: end-to-end coverage of the 7-step
parcours in a real browser. Catches the class of bug where the React tree
renders successfully and unit/component tests pass, but the user flow lands
on the wrong screen — exactly what happened pre-PR #8 with the art. 25 flip
unreachable Step 7 and the prohibition short-circuit ignoring carve-outs.

Infrastructure:
- devDep: @playwright/test
- playwright.config.js — auto-spawns `npm run dev` on :5173, single Chromium
  project, retain trace + screenshot on failure
- .gitignore — exclude test-results/ + playwright-report/

Tests (e2e/parcours.spec.js):
1. happy path — provider with no triggers → RISQUE_MINIMAL
2. high-risk deployer Annex III §3 → HAUT_RISQUE_ANNEXE_III + FRIA visible
3. art. 25 flip — integrator + substantialModification + systemic risk →
   GPAI_RS (regression guard for Bug #1 from the parcours audit)
4. art. 5 carve-out claim does NOT short-circuit — user advances to Step 4
   instead of jumping to verdict (regression guard for Bug #2)

Selectors anchor on the OptionCard aria-label, which composes
`<title> — <sub> — <desc>`. Matching unique sub fragments (e.g. "art. 3(3)",
"art. 5(1)(h)", "art. 5(2)-(3)") keeps selectors stable across copy edits.

Run: `npx playwright test` — 4 tests pass in ~25 s. Not wired into
`npm test` (Vitest scope); future CI could add a separate e2e job.

Co-Authored-By: Claude Opus 4.7 (1M context) <noreply@anthropic.com>
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant