CI and documentation¶
Three GitHub Actions workflows live in .github/workflows/.
Tests (tests.yml)¶
Runs on every push to main, on every pull request, and by hand
(Actions → Tests → Run workflow). A newer push to the same branch
cancels a run in progress.
flowchart LR
P["push / pull request"] --> U["Unit tests<br/>Python 3.10 – 3.15"]
P --> I["Integration tests<br/>Python 3.12 + Postgres"]
Unit tests run on Python 3.10, 3.11, 3.12, 3.13, 3.14 and 3.15, with the
provider extras the tests use (TEST_EXTRAS). One version failing does not
stop the others.
Python 3.15 is a preview
onnxruntime (needed by the fastembed extra) has no wheels for
Python 3.15 yet, so the 3.15 job installs without fastembed and skips
its tests. The job may fail without failing the workflow
(continue-on-error).
Integration tests run every test on Python 3.12 against a
pgvector/pgvector:0.8.7-pg18 service container (the image the compose
file uses), with the embedded vector DB extras (Chroma, LanceDB, FAISS,
Milvus Lite) so the vector DB tests run on every backend. The database is
pagelore_test, given to the tests with PAGELORE_TEST_DATABASE_URL
(Tests).
Dependencies install from uv.lock (uv sync --frozen), and uv's cache is
kept between runs.
Docker image (docker.yml)¶
Builds the image, tests it, and publishes it to the GitHub Container
Registry as ghcr.io/saqrianoo/pagelore
(Use the published image).
| Event | What happens |
|---|---|
Pull request that changes src/, the Dockerfile, pyproject.toml, uv.lock or the workflow |
Build and smoke test, no push |
Push to main that changes the same files |
Publish edge and sha-<commit> |
Tag v1.2.3 (always, whatever changed) |
Publish 1.2.3, 1.2, latest and sha-<commit> |
| Run by hand | Publish sha-<commit> (and edge on main) |
flowchart LR
B["Build<br/>2 variants × amd64 / arm64"] --> S["Smoke test<br/>each image"] --> D["Push by digest"] --> M["Publish<br/>one multi-platform tag"]
Each variant (standard, and slim with a -slim suffix) is built for
linux/amd64 and linux/arm64 on native runners, so nothing is emulated.
The extras come from the workflow's matrix and CLIENT_EXTRAS.
Before anything is pushed, .github/scripts/docker-smoke-test.sh starts
each image against a Postgres service container with an embedded Qdrant.
It checks that the entrypoint migrates, the app starts with the image's
local embedding model, and a document can be indexed and retrieved. The
same script works locally against any Postgres on localhost:
The publish job joins the two platforms of each variant into one tag. Layers are cached in the GitHub Actions cache per variant and platform.
Releasing¶
Making the image public¶
GitHub creates the package the first time the workflow publishes, and new
packages are private. Once, open the package
(your profile → Packages → pagelore → Package settings) and, under
Danger Zone, change the visibility to Public. The package is
linked to the repository by the image's
org.opencontainers.image.source label.
Docs (docs.yml)¶
Builds this site with MkDocs Material and publishes it to GitHub Pages:
| Event | What happens |
|---|---|
Push to main that changes docs/, mkdocs.yml or the workflow |
Build, then deploy |
| Pull request that changes them | Build only, to catch broken links |
| Run by hand (Actions → Docs → Run workflow) | Build, then deploy |
The build runs mkdocs build --strict, which fails on a broken link or
anchor. MkDocs Material is installed from docs/requirements.txt into a
throwaway environment (uv run --no-project), so it never enters the app's
dependencies or uv.lock.
The site is published at https://saqrianoo.github.io/Pagelore/.
Turning on GitHub Pages¶
Once, in the repository on GitHub:
- Open Settings → Pages.
- Under Build and deployment → Source, choose GitHub Actions.
- Run the Docs workflow (push a docs change to
main, or run it by hand).
The deploy job uses the github-pages environment, which GitHub creates on
the first deployment. By default it only accepts deployments from main.
Editing a page¶
Each page has an edit button () that opens its Markdown file on GitHub. To work locally, see Preview the documentation.
Pages are added to the navigation in the nav: section of mkdocs.yml.