stages: - build - test include: - template: Jobs/Code-Quality.gitlab-ci.yml - template: Jobs/Secret-Detection.gitlab-ci.yml - template: Jobs/SAST.gitlab-ci.yml default: interruptible: true tags: - runner workflow: rules: - if: $CI_PIPELINE_SOURCE == "merge_request_event" - if: $CI_COMMIT_BRANCH variables: UV_LINK_MODE: copy UV_CACHE_DIR: "$CI_PROJECT_DIR/.uv-cache" npm_config_cache: "$CI_PROJECT_DIR/.npm-cache" api:build: stage: build image: ghcr.io/astral-sh/uv:python3.13-bookworm script: - uv sync --frozen cache: - key: files: - uv.lock paths: - .uv-cache web:build: stage: build image: node:22 script: - npm --prefix web ci - npm --prefix web run build artifacts: paths: - web/dist expire_in: 1 week cache: - key: files: - web/package-lock.json paths: - .npm-cache api:test: stage: test image: ghcr.io/astral-sh/uv:python3.13-bookworm script: - uv sync --frozen - uv run ruff check . - uv run pytest --junitxml=pytest-report.xml artifacts: when: always reports: junit: pytest-report.xml cache: - key: files: - uv.lock paths: - .uv-cache web:test: stage: test image: node:22 script: - npm --prefix web ci - npm --prefix web run lint cache: - key: files: - web/package-lock.json paths: - .npm-cache