Files
beanflows/.gitlab/.gitlab-ci.yml
Deeman c8b86569ff
All checks were successful
CI / test-cli (push) Successful in 11s
CI / test-sqlmesh (push) Successful in 14s
CI / test-web (push) Successful in 14s
CI / tag (push) Successful in 2s
chore: consolidate to single ruff config in root pyproject.toml
- Merge web ruff settings (select E/F/I/UP, line-length 100) into root config
- Remove [tool.ruff] section from web/pyproject.toml
- Remove "web" from root ruff exclude list
- Simplify pre-commit hook to one command: ruff check .
- Update CI to use: uv run ruff check . (from repo root)

Co-Authored-By: Claude Sonnet 4.6 <noreply@anthropic.com>
2026-02-28 12:21:01 +01:00

65 lines
1.7 KiB
YAML

image: python:3.13
stages:
- test
- tag
variables:
UV_CACHE_DIR: "$CI_PROJECT_DIR/.uv-cache"
cache:
paths:
- .uv-cache/
.uv_setup: &uv_setup
- curl -LsSf https://astral.sh/uv/install.sh | sh
- source $HOME/.local/bin/env
workflow:
rules:
- if: $CI_PIPELINE_SOURCE == "merge_request_event"
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH
# ── Tests ─────────────────────────────────────────────────────────────────────
test:cli:
stage: test
before_script:
- *uv_setup
script:
- uv sync --all-packages
- uv run pytest tests/
test:sqlmesh:
stage: test
before_script:
- *uv_setup
script:
- uv sync --all-packages
- cd transform/sqlmesh_materia && uv run sqlmesh test
test:web:
stage: test
before_script:
- *uv_setup
script:
- uv sync --all-packages
- cd web && uv run pytest tests/ -x -q
- uv run ruff check .
# ── Tag (pull-based deploy) ───────────────────────────────────────────────────
# Creates v<N> tag after all tests pass. The on-server supervisor polls for new
# tags every 60s and deploys automatically. No SSH keys or deploy credentials
# needed in CI — only the built-in CI_JOB_TOKEN.
tag:
stage: tag
image: alpine:latest
before_script:
- apk add --no-cache git
script:
- git tag "v${CI_PIPELINE_IID}"
- git push "https://gitlab-ci-token:${CI_JOB_TOKEN}@${CI_SERVER_HOST}/${CI_PROJECT_PATH}.git" "v${CI_PIPELINE_IID}"
rules:
- if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH