Commit eef0780d authored by inkhey's avatar inkhey

Update .gitlab-ci.yml

parent 8207471e
Pipeline #148124 failed
......@@ -3,28 +3,47 @@
# https://hub.docker.com/r/library/python/tags/
image: python:latest
# Change pip's cache directory to be inside the project directory since we can
# only cache local items.
variables:
PIP_CACHE_DIR: "$CI_PROJECT_DIR/.cache/pip"
# Pip's cache doesn't store the python packages
# https://pip.pypa.io/en/stable/reference/pip_install/#caching
#
# If you want to also cache the installed packages, you have to install
# them in a virtualenv and cache it as well.
cache:
paths:
- .cache/pip
- venv/
before_script:
- python -V # Print out python version for debugging
- pip install virtualenv
- virtualenv venv
- source venv/bin/activate
test:
.pytest: &pytest
stage: test
script:
- pip install -e ".[testing]"
- pytest
\ No newline at end of file
- pytest
stage:
- test
- publish
pytest_latest:
image: python:latest
<<: *pytest
pytest_3.7:
image: python:3.7
<<: *pytest
pytest_3.6:
image: python:3.6
<<: *pytest
pytest_3.5:
image: python:3.5
<<: *pytest
publish_to_pypi:
stage: publish
script:
- pip install -U twine setuptools wheel
- python setup.py bdist_wheel
- twine upload -u $PYPI_USER -p $PYPI_PASS dist/*
only:
- tags
Markdown is supported
0%
or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment