From d177812270dacc94d12f820ab68c49c53481208e Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Wed, 4 Dec 2024 11:42:48 -0300 Subject: [PATCH] Update CI to use poetry for dependency management --- .gitlab-ci.yml | 25 ++++++++++--------------- 1 file changed, 10 insertions(+), 15 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 0020dd0..759bdd8 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -1,20 +1,15 @@ -image: python:3-alpine +image: python:latest -# Also run CI for Merge requests -workflow: - rules: - - if: $CI_PIPELINE_SOURCE == 'merge_request_event' - - if: $CI_COMMIT_TAG - - if: $CI_COMMIT_BRANCH == $CI_DEFAULT_BRANCH +stages: + - lint before_script: - # - python --version ; pip --version # For debugging - - pip install flake8 -qq - - pip install mypy -qq - - pip install types-PyYAML types-psycopg2 -qq + - pip install poetry + - poetry install --no-root -test: +lint: + stage: lint script: - # ignore long lines - - flake8 --ignore=E501 cleanmedia - - mypy cleanmedia \ No newline at end of file + - poetry run ruff check + - poetry run ruff format --check + - poetry run mypy .