Select Git revision
.gitlab-ci.yml
.gitlab-ci.yml 1.61 KiB
image: python:3.5
stages:
- test
- deploy
- docs
client-tests:
stage: test
script:
- pip install .[test]
- pytest
- flake8
client-deploy-pypi:
stage: deploy
when: manual
only:
- master@arkindex/api-client
environment:
name: pypi
url: https://pypi.org/project/arkindex-client
before_script:
- 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
script:
- python setup.py sdist bdist_wheel
- twine upload dist/* -r pypi
client-deploy-testpypi:
stage: deploy
when: manual
only:
- branches@arkindex/api-client
environment:
name: testpypi
url: https://test.pypi.org/project/arkindex-client
before_script:
- 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
script:
- python setup.py sdist bdist_wheel
- twine upload dist/* -r testpypi
pages:
stage: docs
only:
- master
artifacts:
paths:
- public
before_script:
- pip install sphinx
script:
- cd docs
- make html