This repository has been archived on 2022-08-04. You can view files and clone it, but cannot push or open issues or pull requests.
pyurbantz/.gitlab-ci.yml

83 lines
1.8 KiB
YAML
Raw Normal View History

2018-10-20 20:33:07 +00:00
image: python:3.7
2018-10-20 17:49:31 +00:00
stages:
2019-01-30 18:49:21 +00:00
- test
2018-10-20 20:17:23 +00:00
- deploy
2018-10-20 17:49:31 +00:00
2019-01-30 18:49:21 +00:00
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
before_script:
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install .[dev]
2018-10-20 17:49:31 +00:00
2019-01-30 18:49:21 +00:00
tests:
stage: test
coverage: '/TOTAL[\s\d]+\s(\d+%)/'
script:
- coverage run setup.py test
- coverage report
- codecov
flake8:
stage: test
2018-10-20 18:11:47 +00:00
script:
- flake8
2018-10-20 20:17:23 +00:00
deploy-pypi:
stage: deploy
when: manual
only:
- master@Lucidiot/pyurbantz
environment:
name: pypi
url: https://pypi.org/project/pyurbantz
2019-01-30 18:49:21 +00:00
script:
2018-10-20 20:17:23 +00:00
- pip install twine setuptools wheel
- echo "[distutils]" > ~/.pypirc
- echo "index-servers =" >> ~/.pypirc
- echo " pypi" >> ~/.pypirc
- echo "[pypi]" >> ~/.pypirc
- echo "repository=https://upload.pypi.org/legacy/" >> ~/.pypirc
- echo "username=$PYPI_DEPLOY_USERNAME" >> ~/.pypirc
- echo "password=$PYPI_DEPLOY_PASSWORD" >> ~/.pypirc
- python setup.py sdist bdist_wheel
- twine upload dist/* -r pypi
deploy-testpypi:
stage: deploy
when: manual
only:
- branches@Lucidiot/pyurbantz
environment:
name: testpypi
url: https://test.pypi.org/project/pyurbantz
2019-01-30 18:49:21 +00:00
script:
2018-10-20 20:17:23 +00:00
- pip install twine setuptools wheel
- echo "[distutils]" > ~/.pypirc
- echo "index-servers =" >> ~/.pypirc
- echo " testpypi" >> ~/.pypirc
- echo "[testpypi]" >> ~/.pypirc
- echo "repository=https://test.pypi.org/legacy/" >> ~/.pypirc
- echo "username=$PYPI_DEPLOY_USERNAME" >> ~/.pypirc
- echo "password=$PYPI_DEPLOY_PASSWORD" >> ~/.pypirc
- python setup.py sdist bdist_wheel
- twine upload dist/* -r testpypi
2018-10-25 17:10:49 +00:00
pages:
stage: deploy
when: manual
only:
- master@Lucidiot/pyurbantz
artifacts:
paths:
- public
script:
- cd docs
- make html
- mv _build/html ../public