-
Notifications
You must be signed in to change notification settings - Fork 2
Expand file tree
/
Copy pathMakefile
More file actions
66 lines (50 loc) · 2.2 KB
/
Copy pathMakefile
File metadata and controls
66 lines (50 loc) · 2.2 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
.PHONY: dev test test-contracts test-api test-web test-e2e test-e2e-strict demo-gate lint typecheck-api install-api install-web secret-scan test-scripts smoke-live
API_DIR := apps/api
WEB_DIR := apps/web
install-api:
cd $(API_DIR) && uv sync
install-web:
cd $(WEB_DIR) && npm ci
dev:
./scripts/dev.sh
test: test-contracts test-api test-web
test-contracts:
cd $(API_DIR) && uv run pytest tests/unit/test_contract_fixtures.py
test-api:
cd $(API_DIR) && uv run pytest
test-web:
cd $(WEB_DIR) && npm test
test-e2e:
cd e2e && npm test
# Demo-gate lane: retries are disabled so an intermittent console-noise
# failure cannot be masked by a passing retry (npm test keeps the dev
# default from playwright.config.ts, which allows 1 retry for iteration).
test-e2e-strict:
cd e2e && npx playwright test --retries=0
# One-command demo gate: script-gate tests and the working-tree secret scan,
# then contract tests + API + web units, then the E2E suite run STRICT
# (mobile 375x667 + desktop on Chromium, then the desktop-class specs again
# on Firefox; --retries=0 so a flaky pass-through can never hide a genuine
# failure). Fast gates first so a failure surfaces in seconds, not after the
# slowest suite.
demo-gate: test-scripts secret-scan test test-e2e-strict
lint:
cd $(WEB_DIR) && npm run lint
# Static type gate for the API: mypy defaults + check_untyped_defs scoped to
# app/. Like lint, this is a static-quality gate and stays OUTSIDE
# demo-gate, which proves runtime demo readiness.
typecheck-api:
cd $(API_DIR) && uv run mypy app
secret-scan:
python3 scripts/scan_secrets.py
test-scripts:
cd scripts && PYTHONDONTWRITEBYTECODE=1 python3 -m unittest discover -s tests -v
# Deployment acceptance lane: LIVE gate against a deployed origin — the
# online counterpart of demo-gate (which stays hermetic). Never runs in
# demo-gate; needs a real deployment + credentials (and performs real
# provider calls). Make cannot take flags directly, so pass the script's
# arguments through SMOKE_ARGS, e.g.:
# make smoke-live SMOKE_ARGS="--base-url https://jevals.example.org --auth-user me --auth-pass ..."
# or export SMOKE_AUTH_USER/SMOKE_AUTH_PASS and pass only --base-url.
smoke-live:
python3 scripts/smoke_live.py $(SMOKE_ARGS)