|
|
|
@ -12,7 +12,7 @@ |
|
|
|
|
image: python:3.10-slim |
|
|
|
|
variables: |
|
|
|
|
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip" |
|
|
|
|
DS_EXCLUDED_ANALYZERS: bundler-audit, retire.js, gemnasium, gemnasium-maven |
|
|
|
|
# DS_EXCLUDED_ANALYZERS: bundler-audit, retire.js, gemnasium, gemnasium-maven |
|
|
|
|
cache: |
|
|
|
|
paths: |
|
|
|
|
- ".cache/pip" |
|
|
|
@ -27,15 +27,18 @@ test: |
|
|
|
|
script: |
|
|
|
|
- pip install -r requirements-dev.txt |
|
|
|
|
- cp shaarpy/env.sample shaarpy/.env |
|
|
|
|
- coverage run --source='.' manage.py test |
|
|
|
|
- coverage run --source='.' -m pytest |
|
|
|
|
- coverage report |
|
|
|
|
coverage: '/TOTAL.+ ([0-9]{1,3}%)/' |
|
|
|
|
deploy: |
|
|
|
|
script: |
|
|
|
|
# PYPIRC defined in settings - CI/CD - variable |
|
|
|
|
- cat $PYPIRC > /tmp/.pypirc |
|
|
|
|
- pip install twine |
|
|
|
|
- rm -rf dist |
|
|
|
|
- python setup.py sdist bdist_wheel |
|
|
|
|
- twine check dist/* |
|
|
|
|
- twine upload dist/*.tar.gz |
|
|
|
|
- twine check dist/* --config-file /tmp/.pypirc |
|
|
|
|
- twine upload shaarpy-pypi dist/*.tar.gz --config-file /tmp/.pypirc |
|
|
|
|
only: |
|
|
|
|
- tags |
|
|
|
|
stages: |
|
|
|
|