From c0059bea800594c732edd399b462d4046327f9d5 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Sat, 29 Sep 2018 23:14:57 +0200 Subject: [PATCH 1/2] Setup GitLab CI --- .gitlab-ci.yml | 49 +++++++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 49 insertions(+) create mode 100644 .gitlab-ci.yml diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml new file mode 100644 index 0000000..a9c8e91 --- /dev/null +++ b/.gitlab-ci.yml @@ -0,0 +1,49 @@ +image: python + +stages: + - test + +cache: + paths: + - vendor/apt + - .tox + +before_script: + - mkdir -p vendor/apt + # 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 + +python27: + image: python:2.7 + stage: test + script: tox -e py27 + +python34: + image: python:3.4 + stage: test + script: tox -e py34 + +python35: + image: python:3.5 + stage: test + script: + - tox -e py35 + - tox -e cov_combine + # Catch coverage here. Python3.5 supports more Django versions. + coverage: '/TOTAL.*\s(\d+\.\d+)\%$/' + +python36: + image: python:3.6 + stage: test + script: tox -e py36 + +flake8: + image: python:3.6 + stage: test + script: tox -e flake8 + +isort: + image: python:3.6 + stage: test + script: tox -e isort -- 2.47.0 From 845b09cc2bab51ae9647dff51093b4f56e74fc1a Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Aur=C3=A9lien=20Delobelle?= Date: Fri, 5 Oct 2018 23:33:11 +0200 Subject: [PATCH 2/2] Disable coverage in CI GitLab may not like this regex... --- .gitlab-ci.yml | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/.gitlab-ci.yml b/.gitlab-ci.yml index a9c8e91..d1f5c52 100644 --- a/.gitlab-ci.yml +++ b/.gitlab-ci.yml @@ -31,7 +31,8 @@ python35: - tox -e py35 - tox -e cov_combine # Catch coverage here. Python3.5 supports more Django versions. - coverage: '/TOTAL.*\s(\d+\.\d+)\%$/' + # For GitLab, keep this commented. + # coverage: '/TOTAL.*\s(\d+\.\d+)\%$/' python36: image: python:3.6 -- 2.47.0