FAQ | This is a LIVE service | Changelog

Skip to content
Snippets Groups Projects
Commit e2479e40 authored by Dr Abraham Martin's avatar Dr Abraham Martin
Browse files

Merge branch 'issue-6-add-ci' into 'master'

add GitLab CI configuration for testing

Closes #6

See merge request !5
parents 9d62ab15 1352e5c6
No related branches found
No related tags found
1 merge request!5add GitLab CI configuration for testing
Pipeline #1049 passed
root=true
[*.{yml,yaml}]
indent_size=2
indent_style=space
# CI configuration which tests ucamlookup against supported Django and Python
# versions.
#
# GitLab CI does nto support Matrix builds in the traditional sense. Instead we
# build up a matrix of test jobs using inheritance via "extends".
#
# See also: https://gitlab.com/gitlab-org/gitlab-ce/issues/19199
# Test code coverage
coverage:
extends: .test
variables:
TOX_ENVLIST: coverage
PYTHON_VERSION: "3.7"
# Look for the summary line output from coverage's text report. The
# parentheses are used to indicate which portion of the report contains the
# coverage percentage.
coverage: '/^TOTAL\s+\d+\s+\d+\s+(\d+)%$/'
# Check for PEP8 violations
flake8:
extends: .test
variables:
TOX_ENVLIST: flake8
PYTHON_VERSION: "3.7"
# Run test suite against supported Python/Django combinations.
python27-django111:
extends: .py27
variables:
TOX_DJANGO_FRAGMENT: "django111"
python34-django111:
extends: .py34
variables:
TOX_DJANGO_FRAGMENT: "django111"
python35-django111:
extends: .py35
variables:
TOX_DJANGO_FRAGMENT: "django111"
python36-django111:
extends: .py36
variables:
TOX_DJANGO_FRAGMENT: "django111"
python37-django111:
extends: .py37
variables:
TOX_DJANGO_FRAGMENT: "django111"
python34-django20:
extends: .py34
variables:
TOX_DJANGO_FRAGMENT: "django20"
python35-django20:
extends: .py35
variables:
TOX_DJANGO_FRAGMENT: "django20"
python36-django20:
extends: .py36
variables:
TOX_DJANGO_FRAGMENT: "django20"
python37-django20:
extends: .py37
variables:
TOX_DJANGO_FRAGMENT: "django20"
python35-django21:
extends: .py35
variables:
TOX_DJANGO_FRAGMENT: "django21"
python36-django21:
extends: .py36
variables:
TOX_DJANGO_FRAGMENT: "django21"
python37-django21:
extends: .py37
variables:
TOX_DJANGO_FRAGMENT: "django21"
# Template jobs which run tests in various Python versions.
.py27:
extends: .test
variables:
PYTHON_VERSION: "2.7"
TOX_PY_FRAGMENT: "py27"
.py34:
extends: .test
variables:
PYTHON_VERSION: "3.4"
TOX_PY_FRAGMENT: "py34"
.py35:
extends: .test
variables:
PYTHON_VERSION: "3.5"
TOX_PY_FRAGMENT: "py35"
.py36:
extends: .test
variables:
PYTHON_VERSION: "3.6"
TOX_PY_FRAGMENT: "py36"
.py37:
extends: .test
variables:
PYTHON_VERSION: "3.7"
TOX_PY_FRAGMENT: "py37"
# Base test template job.
.test:
image: python:${PYTHON_VERSION}
script:
- pip install tox
- tox -e ${TOX_ENVLIST}
variables:
PYTHON_VERSION: replace-with-python-version
TOX_PY_FRAGMENT: replace-with-pyXY
TOX_DJANGO_FRAGMENT: replace-with-djangoXY
TOX_ENVLIST: "$TOX_PY_FRAGMENT-$TOX_DJANGO_FRAGMENT"
...@@ -11,8 +11,8 @@ ...@@ -11,8 +11,8 @@
# Envs which should be run by default. This will execute a matrix of tests # Envs which should be run by default. This will execute a matrix of tests
envlist = envlist =
py{27,34,35,36}-django111 py{27,34,35,36}-django111
py{34,35,36, 37}-django20 py{34,35,36,37}-django20
py{35,36, 37}-django21 py{35,36,37}-django21
coverage coverage
flake8 flake8
# Allow overriding toxworkdir via environment variable # Allow overriding toxworkdir via environment variable
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment