Using poetry and ruff on gitlab-ci
This commit is contained in:
parent
f3245a6826
commit
f76daf6ddf
@ -3,18 +3,18 @@ image: python:latest
|
|||||||
lint:
|
lint:
|
||||||
stage: test
|
stage: test
|
||||||
before_script:
|
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:
|
script:
|
||||||
- black --check src/
|
- poetry run ruff check ./src
|
||||||
- flake8 src/
|
- poetry run ruff format --check ./src
|
||||||
- isort -c src/
|
|
||||||
|
|
||||||
deploy_to_pypi:
|
deploy_to_pypi:
|
||||||
stage: deploy
|
stage: deploy
|
||||||
only:
|
only:
|
||||||
- master
|
- master
|
||||||
before_script:
|
before_script:
|
||||||
- pip install build twine
|
- pip install poetry
|
||||||
|
- poetry install --no-root
|
||||||
script:
|
script:
|
||||||
- python -m build
|
- POETRY_PYPI_TOKEN_PYPI=$PYPI_PASSWORD poetry publish --build
|
||||||
- TWINE_PASSWORD=$PYPI_PASSWORD TWINE_USERNAME=$PYPI_USERNAME python3 -m twine upload dist/*
|
|
||||||
|
Reference in New Issue
Block a user