.gitlab-ci.yml
stages:
- test
- build
- deploy
pylint:
image: python:3.7
stage: test
before_script:
- python -V
- pip install -r requirements.txt
- pip install pylint>=2.1.1
- pylint --version
script:
- pylint aliceplex
pytest:
image: python:3.7
stage: test
before_script:
- python -V
- pip install -r requirements.txt
- pip install pytest>=4.0.1 pytest-cov>=2.6.0
- pytest --version
script:
- pytest --cov aliceplex tests
flake8:
image: python:3.7
stage: test
before_script:
- python -V
- pip install flake8>=3.6.0
- flake8 --version
script:
- flake8 aliceplex
wheel:
image: python:3.7
stage: build
before_script:
- python -V
- pip install -U setuptools wheel
script:
- python setup.py sdist bdist_wheel
artifacts:
paths:
- dist
expire_in: 1d
only:
- tags
wheel:deploy:
image: python:3.7
stage: deploy
dependencies:
- wheel
before_script:
- python -V
- pip install twine
script:
- twine upload -u $PYPI_USER -p $PYPI_TOKEN dist/*
only:
refs:
- tags
variables:
- $PYPI_USER
- $PYPI_TOKEN