ci: add GitLab CI pipeline aligned with pre-commit configuration
Description
Add GitLab CI/CD pipeline configuration to automate linting, testing, and building.
Changes
- Set up 4 pipeline stages:
setup,lint,test,build - Configure jobs matching pre-commit checks:
-
Lint:
ruff checkandruff format --check -
Test:
mypy,pytest(with coverage ≥75%),vulture,bandit -
Build:
uv buildwith artifact preservation
-
Lint:
- Enable
uvcaching based onuv.lockfor faster pipeline runs - Add coverage reporting with Cobertura format
- Run lint/test jobs on merge requests, default branch, or relevant file changes
- Run build job on tags or default branch
Checklist
-
Pipeline stages mirror local pre-commit hooks -
UV cache configured for CI performance -
Coverage threshold set to 75%