diff --git a/.github/workflows/release_verification.yml b/.github/workflows/release_verification.yml new file mode 100644 index 0000000..d45cd66 --- /dev/null +++ b/.github/workflows/release_verification.yml @@ -0,0 +1,60 @@ +name: release-verification + +on: + pull_request: + push: + branches: + - master + +concurrency: + group: release-verification-${{ github.ref }} + cancel-in-progress: true + +jobs: + release-verification: + runs-on: ubuntu-latest + steps: + - uses: actions/checkout@v4 + + - uses: actions/setup-python@v5 + with: + python-version: "3.12" + + - name: Cache pip + uses: actions/cache@v4 + with: + path: ~/.cache/pip + key: ${{ runner.os }}-pip-3.12-${{ hashFiles('requirements.lock', 'requirements-dev.lock') }} + restore-keys: | + ${{ runner.os }}-pip-3.12- + + - name: Install dependencies + run: | + python -m pip install --upgrade pip + python -m pip install -r requirements.lock -r requirements-dev.lock + + - name: Ruff lint + run: python -m ruff check src tests + + - name: Mypy typecheck + run: python -m mypy src/alpha_research + + - name: Unit tests + run: python -m pytest tests/unit + + - name: Release bundle verification + run: python ./scripts/verify_release_bundle.py --root . + + - name: Configured local smoke + run: python ./scripts/run_release_smoke.py --root . --mode configured-local + + - name: Upload smoke artifacts + uses: actions/upload-artifact@v4 + if: always() + with: + name: configured-local-smoke + path: | + artifacts/ + reports/ + outputs/ + if-no-files-found: ignore diff --git a/Makefile b/Makefile index 82fef40..bf81bed 100644 --- a/Makefile +++ b/Makefile @@ -1,6 +1,6 @@ PYTHON ?= python -.PHONY: bootstrap validate-config dry-run test +.PHONY: bootstrap validate-config dry-run test lint typecheck quality release-verify configured-local-smoke bootstrap: $(PYTHON) -m alpha_research.cli.main bootstrap @@ -13,3 +13,17 @@ dry-run: test: $(PYTHON) -m pytest + +lint: + $(PYTHON) -m ruff check src tests + +typecheck: + $(PYTHON) -m mypy src/alpha_research + +quality: lint typecheck test + +release-verify: + $(PYTHON) ./scripts/verify_release_bundle.py --root . + +configured-local-smoke: + $(PYTHON) ./scripts/run_release_smoke.py --root . --mode configured-local diff --git a/README.md b/README.md index 89baae7..b977fe2 100644 --- a/README.md +++ b/README.md @@ -116,3 +116,4 @@ python .\scripts\run_release_smoke.py --root . --mode live-public Для локального воспроизводимого прогона есть отдельный runbook: `docs/runbooks/reproducible_local_runbook.md`. Для отдельного тяжелого smoke-прогона есть workflow `.github/workflows/release_smoke.yml`. Для честной сверки реализации со спецификацией есть `docs/status/spec_coverage_map.yaml` и `docs/status/spec_gap_audit.md`. +Quality gates и локальные эквиваленты CI описаны в `docs/status/quality_gates.md`. diff --git a/docs/status/quality_gates.md b/docs/status/quality_gates.md new file mode 100644 index 0000000..6df9686 --- /dev/null +++ b/docs/status/quality_gates.md @@ -0,0 +1,25 @@ +# Quality gates + +The repository has two CI paths: + +- `ci.yml` runs the broad lint, type, test, integration, leakage, and configured + local smoke matrix. +- `release_verification.yml` is the focused pull request path for release + evidence: install, lint, typecheck, unit tests, release bundle verification, + and configured-local smoke. + +## Local equivalents + +| CI step | Local command | +| --- | --- | +| Ruff lint | `make lint` | +| Mypy typecheck | `make typecheck` | +| Unit/default tests | `make test` | +| Release bundle verification | `make release-verify` | +| Configured local smoke | `make configured-local-smoke` | + +## Review expectations + +Run the focused path for changes touching pipeline orchestration, configured +adapters, release manifests, reporting, or status artifacts. For docs-only +changes, a markdown review is enough when no command contract changes.