image: python:3.11-bullseye

variables:
  POETRY_CACHE_DIR: "$CI_PROJECT_DIR/.cache/poetry"

cache:
  paths:
    - .cache/poetry


before_script:
  - pip install poetry
  - poetry --version
  - cd build/
  - poetry install --no-root
  - source $(poetry env info --path)/bin/activate

format:
  script:
    - poetry run pre-commit install
    - poetry run yapf -i -r -p .
    - poetry run ruff .
    - poetry run ruff . --fix

test-jobs:
  script:
    - poetry run pytest jobs/tests/

test-tasks:
  script:
    - poetry run pytest tasks/tests/