The pipeline is defined in .gitlab-ci.yml, at the root of the repository. Most jobs only run when the files they check change: a merge request that only touches the client does not run the API tests.
| Pipeline | What runs |
|---|
| Merge request | The checks of each package whose files changed (api/, plugin_api/, client/, documentation/). A change to .gitlab-ci.yml runs them all. |
Push to dev | The CI images of the packages that changed, and the API tests, so that the coverage badge follows dev. |
Push to main | The release of each package whose files changed, its Docker image, and the documentation site. |
When no job applies, pipeline-noop runs so that the pipeline still exists.
The jobs of the API, plugins_api and the client run in images that already hold their dependencies. For each package, Resolve … CI image computes the name of the image from a hash of its dependency files, and Build … CI image builds it and pushes it to the GitLab registry when it does not exist yet. A merge request that does not change the dependencies reuses the existing image.
| Job | Checks |
|---|
API Code audit (ruff) | pixi run lint and pixi run format-check on api/. |
Plugin API Code audit (ruff) | The same on plugin_api/. |
client (eslint) | pnpm run lint on client/. |
client (mdi icons) | pnpm run icons:check: the icon map lists every icon in use. |
| Job | Checks |
|---|
API Dependencies vulnerability (safety) | Known vulnerabilities in the dependencies of the API. |
Plugin API Dependencies vulnerability (safety) | The same for plugins_api. |
Client Dependencies vulnerability (pnpm audit) | pnpm audit --audit-level=high on the client. Allowed to fail. |
API Security breach (bandit) | Insecure patterns in the code of the API. |
Plugin API Security breach (bandit) | The same for plugins_api. |
| Job | Runs |
|---|
API Tests | The whole API suite under coverage, with a Redis service. Publishes the coverage report to the merge request, and fails below the threshold of api/pyproject.toml. |
Client test-and-coverage | pnpm test, the unit tests of the client. |
| Job | Runs |
|---|
API Test Build | Builds the Python package of the API. |
Plugin API Test Build | Builds the Python package of plugins_api. |
Client Test Build | Builds the client and checks the size of the output. |
Documentation build | Builds this site, and fails on a broken internal link. The result is the Documentation preview of the merge request. |
Documentation external links | Checks the links of the site to other sites. Allowed to fail. |
These jobs run on main only.
| Job | Runs |
|---|
Release plugins-api, Release madbot-api, Release madbot-client | semantic-release for each package: version, changelog, publication to the GitLab package registry. When plugins-api is released, the API raises its dependency on it before its own release. See Releases. |
API Docker Image, Client Docker Image | Build the image of the released version and push it to the GitLab registry, with provenance and SBOM attestations. |
pages | Builds this site and publishes it on GitLab Pages. |
Documentation site | Builds this site for the IFB web server and publishes it as the generic package madbot-documentation; the server downloads it and serves it on its own domain. Runs only when the CI/CD variable DOCS_SERVER_SITE holds the address of that domain. |
To release every package whatever changed, run a pipeline on main with the variable FORCE_RELEASE_ALL set to true.