Use poetry for dependency management

This commit is contained in:
Sonny 2020-04-13 17:05:46 +02:00
parent cda2654573
commit e495d7c188
21 changed files with 1252 additions and 75 deletions

View file

@ -34,13 +34,13 @@ python tests:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- .cache/pip
- env/
- .venv/
before_script:
- python3 -m venv env
- source env/bin/activate
- pip install -r requirements/gitlab.txt
- pip install poetry
- poetry config virtualenvs.in-project true
- poetry install --no-interaction
script:
- python src/manage.py test newsreader
- poetry run src/manage.py test newsreader
javascript tests:
image: node:12
@ -76,15 +76,15 @@ python linting:
key: "$CI_JOB_NAME-$CI_COMMIT_REF_SLUG"
paths:
- .cache/pip
- env/
- .venv/
before_script:
- python3 -m venv env
- source env/bin/activate
- pip install -r requirements/gitlab.txt
- pip install poetry
- poetry config virtualenvs.in-project true
- poetry install --no-interaction
script:
- isort src/ --check-only --recursive
- black src/ --line-length 88 --check
- autoflake src/ --check --recursive --remove-all-unused-imports --ignore-init-module-imports
- poetry run isort src/ --check-only --recursive
- poetry run black src/ --line-length 88 --check
- poetry run autoflake src/ --check --recursive --remove-all-unused-imports --ignore-init-module-imports
deploy:
stage: deploy