.gitlab-ci.yml 3.06 KiB
image: docker.km3net.de/base/python:3
# 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/pip
- venv/
key: "$CI_COMMIT_REF_SLUG"
stages:
- test
- coverage
- doc
- release
.virtualenv_template: &virtualenv_definition |
python -V
pip install virtualenv
virtualenv venv
source venv/bin/activate
pip install -r requirements-dev.txt
make install
.junit_template: &junit_definition
artifacts:
reports:
junit: "reports/junit*.xml"
test-py3.5:
image: docker.km3net.de/base/python:3.5
stage: test
script:
- *virtualenv_definition
- make test
<<: *junit_definition
allow_failure: true
test-py3.6:
image: docker.km3net.de/base/python:3.6
stage: test
script:
- *virtualenv_definition
- make test
<<: *junit_definition
test-py3.7:
image: docker.km3net.de/base/python:3.7
stage: test
script:
- *virtualenv_definition
- make test
<<: *junit_definition
test-py3.8:
image: docker.km3net.de/base/python:3.8
stage: test
script:
- *virtualenv_definition
- make test
<<: *junit_definition
test-py3.9:
image: docker.km3net.de/base/python:3.9
stage: test
script:
- *virtualenv_definition