From f76daf6ddfac3cda577b16e3739b4460938d8288 Mon Sep 17 00:00:00 2001 From: Roger Gonzalez Date: Sat, 2 Mar 2024 10:13:58 -0300 Subject: [PATCH] Using poetry and ruff on gitlab-ci --- .gitlab-ci.yml | 14 +++++++------- 1 file changed, 7 insertions(+), 7 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index 697c87d..350b74e 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,18 +3,18 @@ image: python:latest lint: stage: test before_script: - - pip install black flake8 isort flake8-bugbear flake8-builtins flake8-comprehensions flake8-tidy-imports flake8-eradicate flake8-print flake8-return flake8-use-fstring git+https://github.com/derrix060/flake8-expression-complexity.git + - pip install poetry + - poetry install --no-root script: - - black --check src/ - - flake8 src/ - - isort -c src/ + - poetry run ruff check ./src + - poetry run ruff format --check ./src deploy_to_pypi: stage: deploy only: - master before_script: - - pip install build twine + - pip install poetry + - poetry install --no-root script: - - python -m build - - TWINE_PASSWORD=$PYPI_PASSWORD TWINE_USERNAME=$PYPI_USERNAME python3 -m twine upload dist/* + - POETRY_PYPI_TOKEN_PYPI=$PYPI_PASSWORD poetry publish --build