Document CI-run test suite and coverage in README

This commit is contained in:
Adam Moussa 2026-05-29 15:05:29 -04:00
parent f47757adf0
commit 0678f3f46f

View file

@ -162,18 +162,24 @@ Any `.xlsx`/`.csv` landing under `raw/` invokes the classifier.
## Local development ## Local development
- pyenv Python 3.12. `ruff check` + `ruff format --check` before pushing (hook-enforced). - pyenv Python 3.12. `ruff check` + `ruff format --check` before pushing (hook-enforced).
- Tests: `python -m pytest tests/ -q` (60 tests — classifier smoke test against a real - Tests: `python -m pytest tests/ -q` (~158 tests — classifier rule ladder + handler
export + offline `cdk.assertions` synth checks + Block Kit builders). No AWS needed. transforms + Haiku fallback, Block Kit builders, the signature-verified Slack
- Smoke-test the classifier against a **real export** before declaring any interactions endpoint, slack-post orchestration, and offline `cdk.assertions` synth
classification change done: `~/Downloads/_documents/Sheet1-1.xlsx`. checks). No AWS needed — external boundaries are monkeypatched. **Tests run in CI**
- `cdk synth` must pass in CI before merge (**Docker required** — Lambda deps are (`ci.yaml` sets `run-tests: true`); coverage is reported via `pytest-cov`
bundled for ARM64). (`tests/requirements.txt`, ~94%, non-gating).
- The classification quality gate (deterministic "Other" share) runs in CI against a
committed synthetic fixture `tests/fixtures/sample_export.csv`. Additionally,
smoke-test against the **real export** before declaring any classification change
done: `~/Downloads/_documents/Sheet1-1.xlsx` (skips automatically when absent).
- `cdk synth` must pass in CI before merge (**Docker + QEMU** — Lambda deps are
bundled for ARM64; `ci.yaml` sets `enable-qemu: true`).
## Deployment ## Deployment
CI/CD via the org reusable workflows (no manual prod deploys in steady state): CI/CD via the org reusable workflows (no manual prod deploys in steady state):
- **CI** (`.github/workflows/ci.yaml`) → `ci-python-sam.yaml@main`: ruff + `cdk synth`. Runs on PRs into `main`. - **CI** (`.github/workflows/ci.yaml`) → `ci-python-sam.yaml@main`: ruff + `pytest` + `cdk synth` (QEMU-enabled). Runs on PRs into `main`.
- **Deploy** (`.github/workflows/deploy.yaml`) → `cd-cdk.yaml@main`: OIDC assume-role, `cdk deploy --all`, single-flight concurrency. Runs on push to `main`. - **Deploy** (`.github/workflows/deploy.yaml`) → `cd-cdk.yaml@main`: OIDC assume-role, `cdk deploy --all`, single-flight concurrency. Runs on push to `main`.
Stack name/region/account: `apm-wo-analysis-{pipeline,grafana}` / us-east-1 / 328440206208. Stack name/region/account: `apm-wo-analysis-{pipeline,grafana}` / us-east-1 / 328440206208.