From 509a1bbd96df0b9028eefb84f360573e5ffed79b Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Sat, 6 Oct 2018 12:09:04 +0200 Subject: [PATCH 1/2] Run CI for all Django versions for each Python one --- .gitlab-ci.yml | 23 +++++++++++++++++++---- tox.ini | 1 + 2 files changed, 20 insertions(+), 4 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index d1f5c52..a7ff218 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -17,18 +17,31 @@ before_script: python27: image: python:2.7 stage: test - script: tox -e py27 + script: + - tox -e django18-py27 + - tox -e django19-py27 + - tox -e django110-py27 + - tox -e django111-py27 python34: image: python:3.4 stage: test - script: tox -e py34 + script: + - tox -e django18-py34 + - tox -e django19-py34 + - tox -e django110-py34 + - tox -e django111-py34 + - tox -e django20-py34 python35: image: python:3.5 stage: test script: - - tox -e py35 + - tox -e django18-py35 + - tox -e django19-py35 + - tox -e django110-py35 + - tox -e django111-py35 + - tox -e django20-py35 - tox -e cov_combine # Catch coverage here. Python3.5 supports more Django versions. # For GitLab, keep this commented. @@ -37,7 +50,9 @@ python35: python36: image: python:3.6 stage: test - script: tox -e py36 + script: + - tox -e django111-py36 + - tox -e django20-py36 flake8: image: python:3.6 diff --git a/tox.ini b/tox.ini index 513c573..33551bd 100644 --- a/tox.ini +++ b/tox.ini @@ -1,4 +1,5 @@ [tox] +# Update .gitlab-ci.yml if you change the Django/Python matrix envlist = django{18,19,110}-py{27,34,35}, django111-py{27,34,35,36}, From e936fb70deeb447573fd6fb0f893b8679928012a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Sat, 6 Oct 2018 12:11:08 +0200 Subject: [PATCH 2/2] Try caching pip packages --- .gitlab-ci.yml | 7 +++++-- 1 file changed, 5 insertions(+), 2 deletions(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a7ff218..5235580 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -3,13 +3,16 @@ image: python stages: - test +variables: + PIP_CACHE_DIR: "$CI_PROJECT_DIR/vendor/pip" + cache: paths: - - vendor/apt + - vendor - .tox before_script: - - mkdir -p vendor/apt + - mkdir -p vendor/{apt,pip} # http://www.python-ldap.org/en/latest/installing.html - apt-get update -q && apt-get -o dir::cache::archives="vendor/apt" install -yqq build-essential python2.7-dev python3-dev libldap2-dev libsasl2-dev - pip install tox