forked from ChelseaKR/tods-validate
-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathMakefile
More file actions
54 lines (43 loc) · 1.93 KB
/
Copy pathMakefile
File metadata and controls
54 lines (43 loc) · 1.93 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
# make verify reproduces the full merge-blocking gate set locally, byte-for-
# byte with CI (CICD-27). Run it before opening a PR; the release workflows
# re-run it at the tagged commit before anything publishes (REL-14/15).
.PHONY: verify lint format typecheck test docs-check contract-check i18n-check audit secrets a11y
verify: lint format typecheck test docs-check contract-check i18n-check audit secrets a11y
@echo "make verify: all gates passed."
lint:
ruff check src tests scripts
format:
ruff format --check src tests scripts
typecheck:
mypy
test:
pytest --cov --cov-report=term-missing --cov-fail-under=90
docs-check:
python scripts/generate_rules_doc.py --check
contract-check:
python scripts/check_public_contract.py
i18n-check:
python scripts/check_i18n.py
# Dependency vulnerability audit (CQ-11 / SEC-11). --strict also fails on any
# dependency pip-audit could not evaluate, rather than silently skipping it.
# Audits the exact pins in uv.lock (what `uv sync --frozen` installs) minus
# the project itself: during a release PR the bumped version does not exist
# on PyPI yet, so auditing the local package can only ever fail; every real
# dependency is still audited.
audit:
req="$$(mktemp)" && \
uv export --frozen --extra dev --no-emit-project --no-hashes --quiet \
--format requirements-txt -o "$$req" && \
pip-audit --strict --no-deps -r "$$req"; \
rc=$$?; rm -f "$$req"; exit $$rc
# Secret scan over the working tree + history (SEC-17/18). Requires the
# gitleaks binary (see https://github.com/gitleaks/gitleaks#installing); the
# CI job installs it explicitly rather than via the license-gated Action.
secrets:
gitleaks detect --source . --redact --exit-code 1
# Blocking WCAG 2.1 AA automation for the browser playground and a generated
# HTML report. npm ci must have been run first; CI and the reusable release
# verification workflow both install from package-lock.json.
a11y:
npm audit --audit-level=high
npm run a11y