# CI/CD Pipeline The CI pipeline runs on **Forgejo Actions** and is defined in [`.forgejo/workflows/lint-and-build.yml`](../../.forgejo/workflows/lint-and-build.yml). **Triggers**: push and pull request to `main` and `develop`. ## Jobs Four jobs, each running in a `rust:latest` container on the `docker` runner: | Job | Depends on | Command | Purpose | |-----|-----------|---------|---------| | `format` | — | `cargo fmt --all -- --check` | Strict formatting check (must pass) | | `clippy` | — | `cargo clippy --all-targets --all-features` | Lint (non-strict — warnings shown, don't fail) | | `build` | `format`, `clippy` | `cargo build --release` | Release build | | `test` | `format`, `clippy` | `cargo test --all-targets` | Unit + integration tests | `format` and `clippy` run in parallel; `build` and `test` run after both pass. ### The `test` job Integration tests need a live MongoDB, so the `test` job provisions a `mongo:7` **service container** and sets `MONGODB_URI=mongodb://mongo:27017`. The tests target an isolated per-run database and skip gracefully if Mongo is unreachable, so the job stays green even on runners that can't provide service containers. ## Docker builds are NOT in CI There is deliberately **no `docker-build` job**. The Forgejo `act` runner creates isolated networks per job, which breaks every Docker-in-CI approach tried (socket mount, DinD, Buildx, direct host access). Docker images are built separately: - **Locally**: `docker build -f backend/docker/Dockerfile backend/` - **On Solaria**: see [../deployment/](../deployment/DEPLOYMENT_GUIDE.md) ## Running CI checks locally Use [`scripts/test-ci-locally.sh`](../../scripts/test-ci-locally.sh), which runs the same format/clippy/build/test sequence. For the integration tests it needs a reachable MongoDB: ```bash docker run -d -p 27017:27017 --name mongo-test mongo:7 ./scripts/test-ci-locally.sh ``` ## Dashboard CI runs: `http://gitea.solivarez.com.ar/alvaro/normogen/actions` --- *Last Updated: 2026-06-27*