Module 7: Ship it
Goal
By the end of this module, a stranger can install echo-check in two minutes,
every push is tested automatically, this course is a website, and there's a
v1.0.4 release.
The concept
The README is the front door. Most people read the first screen and leave. Put the quick start first, with a command that works on a fresh clone, and show the output they should see. Then the details: config guide, privacy, setup.
CI is a promise. A green badge says "the tests passed on a clean machine", not just on yours. Our CI runs four checks with no secrets:
- Lint (
ruff) catches unused imports and risky patterns. - Tests (
pytest) need no API key, because the summary tests use a fake client. - Detection evals (
run_evals.py) exit with 1 if an exact rule drops below 100%, which fails the build. - Docs build (
mkdocs build --strict) fails on a broken link.
Pin your actions. A workflow line like
uses: actions/checkout@3d3c42e⦠# v7.0.1 points at one exact commit. A tag
like @v7 can be moved by whoever controls the action, so a pinned SHA
protects you from a tampered release.
Docs from the same repo. The course lives in course/ as Markdown.
MkDocs Material turns it into a site, and a workflow publishes it to GitHub Pages
whenever course/ changes. The docs can't drift from the code, because they
change in the same pull request.
Versions mean something. 1.0.4 says "the config format and the tool
names are stable". After that, a breaking config change means 2.0.0. A tag
marks the exact commit, and a GitHub release adds notes for humans.
Code walkthrough
README.md: quick start, config table, privacy, MCP setup, summary, evals..github/workflows/ci.yml: one job on Ubuntu. It runsuv sync --locked(fails ifuv.lockis out of date), then the four checks..github/workflows/docs.yml: abuildjob (mkdocs build --strict, then upload the site) and adeployjob. Only the deploy job getspages: write. Every other step is read-only.mkdocs.yml: the site name, the theme, and thenavlist of modules. Links to repo files such assrc/are allowed to point outside the site.pyproject.toml:version = "1.0.4", plus adocsdependency group, so the site tools aren't installed for normal use.
Try it:
uv run --group docs mkdocs serve # preview at http://127.0.0.1:8000
uv run --group docs mkdocs build --strict
The one-time GitHub setup: Settings ā Pages ā Source: GitHub Actions. Then:
git tag v1.0.4
git push origin v1.0.4
gh release create v1.0.4 --title "v1.0.4" --notes "Stable release."
Exercise
- Break a link in
course/module-03.md, then runuv run --group docs mkdocs build --strict. What does it say? - In a branch, change
same_payment's keys so an exact rule drops below 100%. Push it and open a PR. Which CI step fails? - Write a second config for a different fixed-width format, such as a made-up 80-character payroll file. How much code did you change?
What can go wrong
- "Works on my machine." Windows line endings, a missing file in Git, or an unpinned dependency. CI on a clean Ubuntu runner catches all three.
- Secrets in CI. You don't need any here. If you add live summary evals later, store the key as a repository secret and run them by hand, not on every PR from a fork.
- Pages not enabled. The deploy job fails with a "not found" error until Pages is set to "GitHub Actions" once.
- Docs that lie. Example output in a README goes stale. Copy it from a real run, and re-run it before each release.
- Tagging the wrong commit. Tag
mainafter the merge, not your feature branch.