Files
ETPlot/.gitlab-ci.yml
T
lars 3b9d1ef1a8 Rewrite CI to lint/typecheck/audit/test only; add HPC deployment path
- Replace the Docker build/publish CI stages with ruff (lint + format
  check), ty (type check), pip-audit, and pytest run directly against
  python:3.11-slim; Docker remains for manual/server deployment only.
- Swap black/pylint/mypy for ruff/ty across pyproject.toml, and fix
  every resulting lint, format, and type diagnostic in gallery/ and
  plotstyle/.
- Fix tests broken/stale from before the package restructuring: wrong
  `utils.*` import paths, mock patch targets pointed at the wrong
  module, and PDF-conversion tests still assuming ImageMagick instead
  of the current PyMuPDF-first path. Drop test_container.py (obsolete
  Docker-container smoke tests, fully superseded elsewhere).
- Add a plain-venv + systemd --user timer deployment path
  (deploy/systemd/) for HPC login nodes without a Docker daemon, where
  public_html is already served by existing infrastructure.
- Document both in CLAUDE.md, including running CI's checks locally
  before committing.

Co-Authored-By: Claude Sonnet 5 <noreply@anthropic.com>
2026-07-22 15:29:55 +02:00

62 lines
1.2 KiB
YAML

# GitLab CI/CD Pipeline for ETPlot
# Lints, type-checks, and tests the package. No container build/publish.
stages:
- check
- test
image: python:3.11-slim
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
key: "$CI_COMMIT_REF_SLUG"
paths:
- .cache/pip
.install: &install
before_script:
- pip install -e ".[dev,plotting]"
# ---------------------------------------------------------------------------
# Check: lint, format, type check, vulnerabilities
# ---------------------------------------------------------------------------
lint:ruff:
stage: check
<<: *install
script:
- ruff check gallery plotstyle tests
format:ruff:
stage: check
<<: *install
script:
- ruff format --check gallery plotstyle tests
typecheck:ty:
stage: check
<<: *install
script:
- ty check gallery plotstyle
vulnerabilities:pip-audit:
stage: check
<<: *install
script:
- pip-audit
# ---------------------------------------------------------------------------
# Test
# ---------------------------------------------------------------------------
test:pytest:
stage: test
<<: *install
script:
- python -m pytest tests/ -v
artifacts:
when: always
expire_in: 30 days