Skip to content
Snippets Groups Projects
.gitlab-ci.yml 542 B
Newer Older
nguyed99's avatar
nguyed99 committed
image: python:3.11-bullseye

nguyed99's avatar
nguyed99 committed
variables:
nguyed99's avatar
nguyed99 committed
  POETRY_CACHE_DIR: "$CI_PROJECT_DIR/.cache/poetry"
nguyed99's avatar
nguyed99 committed

nguyed99's avatar
nguyed99 committed
cache:
  paths:
nguyed99's avatar
nguyed99 committed
    - .cache/poetry
nguyed99's avatar
nguyed99 committed

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

format:
nguyed99's avatar
nguyed99 committed
  script:
nguyed99's avatar
nguyed99 committed
    - poetry run pre-commit install
    - poetry run yapf -i -r -p .
    - poetry run ruff .
    - poetry run ruff . --fix

nguyed99's avatar
nguyed99 committed
test-jobs:
  script:
nguyed99's avatar
nguyed99 committed
    - poetry run pytest jobs/tests/
nguyed99's avatar
nguyed99 committed
test-tasks:
nguyed99's avatar
nguyed99 committed
  script:
nguyed99's avatar
nguyed99 committed
    - poetry run pytest tasks/tests/