Skip to content
Snippets Groups Projects
Commit a67eecec authored by Felix Schäfer's avatar Felix Schäfer :construction_worker:
Browse files

Update gitlab-ci.yml

parent 623275b2
No related branches found
No related tags found
No related merge requests found
Pipeline #63965 passed
test:
script:
- cp /keys/.pypirc ~/.pypirc
- virtualenv env
- source env/bin/activate
- XDG_CACHE_HOME=/cache pip3 install -U pip wheel setuptools pytest pytest-django coverage
- XDG_CACHE_HOME=/cache pip3 install -U "git+https://github.com/pretix/pretix.git@master#egg=pretix&subdirectory=src"
- python setup.py develop
- make
- coverage run -m py.test tests
- coverage report
tags:
- python3
style:
---
stages:
- linting
# 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"
cache:
paths:
- .cache
docformatter:
stage: linting
image: python:3
before_script:
- pip3 install -U pip docformatter
script:
- cp /keys/.pypirc ~/.pypirc
- virtualenv env
- source env/bin/activate
- XDG_CACHE_HOME=/cache pip3 install -U pip wheel setuptools isort docformatter black flake8 check-manifest
- XDG_CACHE_HOME=/cache pip3 install -U "git+https://github.com/pretix/pretix.git@master#egg=pretix&subdirectory=src"
- python setup.py develop
- docformatter --check -r .
black:
stage: linting
image: python:3
before_script:
- pip3 install -U pip black
script:
- black --check .
isort:
stage: linting
image: python:3
before_script:
- pip3 install -U pip isort
script:
- isort -c .
- flake8 .
- check-manifest .
tags:
- python3
pypi:
flake8:
stage: linting
image: python:3
before_script:
- pip3 install -U pip flake8
script:
- cp /keys/.pypirc ~/.pypirc
- virtualenv env
- source env/bin/activate
- XDG_CACHE_HOME=/cache pip3 install -U pip wheel setuptools twine check-manifest
- XDG_CACHE_HOME=/cache pip3 install -U pretix
- python setup.py develop
- python setup.py sdist bdist_wheel
- check-manifest .
- twine check dist/*
- twine upload dist/*
tags:
- python3
only:
- pypi
artifacts:
paths:
- dist/
- flake8 .
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment