Skip to content

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:

  1. Lintruff check .
  2. Format checkruff format --check .
  3. Type checkmypy src/ (strict mode)
  4. Unit testspytest tests/unit/ with 80% coverage minimum
  5. Integration testspytest tests/integration/ (against a Postgres service container)
  6. E2E testspytest tests/e2e/
  7. 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:

  1. Installs Python 3.12 and mkdocs-material
  2. Builds the site via mkdocs build
  3. 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:

# All checks in one command
uv run pre-commit run --all-files

# Or individually
uv run ruff check .
uv run ruff format --check .
uv run mypy src/
uv run pytest tests/unit/ --cov=src --cov-fail-under=80