Skip to content

Continuous integration

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.

PipelineWhat runs
Merge requestThe checks of each package whose files changed (api/, plugin_api/, client/, documentation/). A change to .gitlab-ci.yml runs them all.
Push to devThe CI images of the packages that changed, and the API tests, so that the coverage badge follows dev.
Push to mainThe 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.

JobChecks
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.
JobChecks
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.
JobRuns
API TestsThe 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-coveragepnpm test, the unit tests of the client.
JobRuns
API Test BuildBuilds the Python package of the API.
Plugin API Test BuildBuilds the Python package of plugins_api.
Client Test BuildBuilds the client and checks the size of the output.
Documentation buildBuilds this site, and fails on a broken internal link. The result is the Documentation preview of the merge request.
Documentation external linksChecks the links of the site to other sites. Allowed to fail.

These jobs run on main only.

JobRuns
Release plugins-api, Release madbot-api, Release madbot-clientsemantic-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 ImageBuild the image of the released version and push it to the GitLab registry, with provenance and SBOM attestations.
pagesBuilds this site and publishes it on GitLab Pages.
Documentation siteBuilds 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.