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.
python-usda/.gitlab-ci.yml

95 lines
1.9 KiB
YAML
Raw Permalink Normal View History

2018-10-20 20:48:21 +00:00
image: python:3.7
2018-08-26 20:19:36 +00:00
stages:
- test
2018-10-20 20:48:21 +00:00
- deploy
2018-08-26 20:19:36 +00:00
2019-07-06 18:25:29 +00:00
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
cache:
paths:
- .cache/pip
- venv/
before_script:
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
- pip install .[dev]
2018-10-20 20:48:21 +00:00
tests:
2018-08-26 20:19:36 +00:00
stage: test
script:
2019-07-06 18:25:45 +00:00
- pytest --cov=usda
- codecov
flake8:
stage: test
script:
- flake8
doc8:
stage: test
script:
- doc8
2018-08-26 20:19:36 +00:00
2018-10-20 20:48:21 +00:00
deploy-pypi:
stage: deploy
when: manual
only:
- master@Lucidiot/python-usda
environment:
name: pypi
url: https://pypi.org/project/python-usda
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
deploy-testpypi:
stage: deploy
when: manual
only:
2018-10-20 20:50:24 +00:00
- branches@Lucidiot/python-usda
2018-10-20 20:48:21 +00:00
environment:
name: testpypi
url: https://test.pypi.org/project/python-usda
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
2018-10-26 06:28:56 +00:00
pages:
stage: deploy
when: manual
only:
- master@Lucidiot/python-usda
artifacts:
paths:
- public
before_script:
- pip install .[dev]
script:
- cd docs
- make html
- mv _build/html ../public