CI/CD¶
The project uses GitHub Actions for continuous integration and deployment.
Workflows¶
CI (ci.yml)¶
Runs on every push and pull request to main.
Steps:
- Lint —
ruff check . - Format check —
ruff format --check . - Type check —
mypy src/(strict mode) - Unit tests —
pytest tests/unit/with 80% coverage minimum - Integration tests —
pytest tests/integration/(against a Postgres service container) - E2E tests —
pytest tests/e2e/ - Coverage comment — posts coverage report on PRs
The CI job spins up a pgvector/pgvector:pg16 service container (Postgres 16 with pgvector extension) for integration and E2E tests.
Deploy Apps (deploy.yml)¶
Triggers after the CI workflow completes successfully on main (via workflow_run).
Deploys both Fly.io apps via a matrix strategy:
| App | Config | Description |
|---|---|---|
naluma-content-worker |
fly.toml |
Prefect worker + server |
naluma-dashboard |
fly.dashboard.toml |
Streamlit dashboard |
Each app deploys independently via flyctl deploy --remote-only --config <config>.
Requires the FLY_API_TOKEN repository secret. See Deployment for setup.
Deploy Docs (deploy-docs.yml)¶
Triggers on push to main when docs/site/** or mkdocs.yml change. Also supports workflow_dispatch for manual triggers.
Steps:
- Installs Python 3.12 and mkdocs-material
- Builds the site via
mkdocs build - Deploys to Cloudflare Pages via
wrangler pages deploy
Requires the CLOUDFLARE_API_TOKEN and CLOUDFLARE_ACCOUNT_ID repository secrets.
Running CI Locally¶
To mirror what CI does: