This commit is contained in:
+40
@@ -0,0 +1,40 @@
|
||||
# CI Pipeline — Configuration
|
||||
|
||||
> Per confirmed answers: self-hosted **Gitea Actions**, tests-only pipeline,
|
||||
> nothing to deploy, gated on push/PR to main. Repo: `armistace/newspaper_wedding`
|
||||
> on gitea@192.168.178.155.
|
||||
|
||||
## Gitea Actions workflow (`.gitea/workflows/test.yml`)
|
||||
|
||||
```yaml
|
||||
name: Test
|
||||
|
||||
on:
|
||||
push:
|
||||
branches: [main]
|
||||
pull_request:
|
||||
branches: [main]
|
||||
|
||||
jobs:
|
||||
test:
|
||||
runs-on: ubuntu-latest
|
||||
steps:
|
||||
- uses: actions/checkout@v4
|
||||
- uses: astral-sh/setup-uv@v5
|
||||
with:
|
||||
python-version: "3.12"
|
||||
- name: Install
|
||||
run: cd newspaper && uv sync --extra dev
|
||||
- name: Run tests
|
||||
run: cd newspaper && uv run pytest tests/ -q
|
||||
```
|
||||
|
||||
## Notes
|
||||
- **Tests only** — there is no deploy/build/publish stage (nothing to deploy;
|
||||
file-only local tool). This matches the confirmed infrastructure-design posture.
|
||||
- The test command is the exact one Build and Test verified
|
||||
(`uv run --project newspaper pytest newspaper/tests/ -q`); scoped to the
|
||||
newspaper project. (`cd newspaper && uv run pytest tests/ -q` is the
|
||||
workflow's equivalent, running from the package root.)
|
||||
- The model/fetch transports are mocked in tests — no live cloud model or
|
||||
content-enrichment call is made in CI.
|
||||
+34
@@ -0,0 +1,34 @@
|
||||
# CI Pipeline — Questions
|
||||
|
||||
> Confirmed answers (from infrastructure-design / the gitea posture + established
|
||||
> auto-approve flow; the pipeline is tests-only, nothing is deployed).
|
||||
|
||||
## Q: CI tool / branch
|
||||
A) Self-hosted **Gitea Actions** on the confirmed repo — tests only, gated on push/PR to main ✓
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Q: Quality gates
|
||||
A) The confirmed quality gates: the full unit + integration suite must pass
|
||||
(e.g. `uv run --project newspaper pytest newspaper/tests/ -q`). No deploy stage
|
||||
exists. ✓
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Q: Artifact repositories
|
||||
A) None — nothing is deployed/published; no ECR/CodeArtifact/S3. ✓
|
||||
|
||||
[Answer]: A
|
||||
|
||||
## Consolidated Summary Confirmation
|
||||
|
||||
> CI = Gitea Actions test pipeline (tests-only, nothing to deploy), quality gate
|
||||
> = the full test suite passes, no artifact repos. Human auto-approved (established
|
||||
> flow + infra-design decision).
|
||||
|
||||
Does this all look correct before I generate the CI artifacts?
|
||||
|
||||
- Looks correct
|
||||
- Request changes
|
||||
|
||||
[Answer]: Looks correct
|
||||
@@ -0,0 +1,15 @@
|
||||
<!-- INVARIANT: examples are single-line HTML comments so a fresh template parses to total=0 (MEMORY_EMPTY). Do NOT un-comment or split across lines. t100 guards this. -->
|
||||
> This file is kept up to date automatically while the stage runs. Add observations at the review step, not by editing here directly.
|
||||
|
||||
## Interpretations
|
||||
<!-- example: 2026-05-29T10:14:32Z — chose REST over GraphQL; the consuming team only needs CRUD, revisit if subscriptions land -->
|
||||
|
||||
## Deviations
|
||||
<!-- example: 2026-05-29T10:14:32Z — skipped the optional caching layer the stage prose suggested; the dataset is small enough that it adds risk -->
|
||||
|
||||
## Tradeoffs
|
||||
<!-- example: 2026-05-29T10:14:32Z — picked TDD over BDD this run; the team is unit-first and the domain is well-understood -->
|
||||
|
||||
## Open questions
|
||||
<!-- example: 2026-05-29T10:14:32Z — confirm the retention window with compliance before the next stage hardens the schema -->
|
||||
2026-09-14T11:35:00Z — Interpretation — CI = gitea Actions tests-only pipeline (confirmed at infra-design); quality gate = full suite passes; no deploy/artifact stage. Phase boundary Construction→Operation PASS.
|
||||
+25
@@ -0,0 +1,25 @@
|
||||
# CI Pipeline — Quality Gates
|
||||
|
||||
## Required before merge
|
||||
The CI pipeline must pass:
|
||||
1. **Full test suite green** — `uv run --project newspaper pytest newspaper/tests/ -q`
|
||||
(22 unit tests: ai-draft 7, funnies 7, generator 8). This is the primary,
|
||||
non-negotiable gate.
|
||||
2. **No remote refs / self-contained emit** — the generator tests assert the
|
||||
emitted `newspaper.html` contains no `http(s)` references (NFR4) and no
|
||||
fabricated photos when none supplied (FR7.4).
|
||||
3. **AI isolation** — ai-draft tests assert briefs carry no secrets and the model
|
||||
call is behind a narrow client (NFR9).
|
||||
|
||||
## Gate policy
|
||||
- **Blocking**: any test failure blocks the pipeline (fail closed).
|
||||
- **No deploy gate** — there is no deployment/artifact step. The "pipeline"
|
||||
concludes after tests pass; the artifact is the local `newspaper.html` the
|
||||
couple generates and prints.
|
||||
|
||||
## Traceability to Build and Test
|
||||
Every quality gate above maps directly to a target recorded as **Met** in
|
||||
`build-and-test/build-and-test-summary.md`:
|
||||
- test suite → the 22 passing tests
|
||||
- zero-network → NFR4 Met
|
||||
- AI isolation → NFR9 Met
|
||||
Reference in New Issue
Block a user