From aafee45169fa46e8479145e48ff0aca3c5d21c16 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Thu, 28 Nov 2019 22:10:39 +0900 Subject: [PATCH 1/2] travis: Add test for Django 2.2 --- .travis.yml | 28 ++++++++++++++++++++++------ 1 file changed, 22 insertions(+), 6 deletions(-) diff --git a/.travis.yml b/.travis.yml index f838948b..948581cb 100644 --- a/.travis.yml +++ b/.travis.yml @@ -37,15 +37,15 @@ after_success: matrix: include: - - &django_py3 + - &django_1_11 name: "Django 1.11 test (Python 3.7)" python: "3.7" install: - pip install -U pip - - wget https://github.com/django/django/archive/1.11.18.tar.gz - - tar xf 1.11.18.tar.gz - - pip install django-1.11.18/ - - cp ci/test_mysql.py django-1.11.18/tests/ + - wget https://github.com/django/django/archive/1.11.26.tar.gz + - tar xf 1.11.26.tar.gz + - pip install django-1.11.26/ + - cp ci/test_mysql.py django-1.11.26/tests/ - pip install . before_script: @@ -54,7 +54,23 @@ matrix: - mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql mysql script: - - cd django-1.11.18/tests/ + - cd django-1.11.26/tests/ + - ./runtests.py --parallel=1 --settings=test_mysql + + - &django_2_2 + <<: *django_py27 + name: "Django 2.2 test (Python 3.8)" + python: "3.8" + install: + - pip install -U pip + - wget https://github.com/django/django/archive/2.2.7.tar.gz + - tar xf 2.2.7.tar.gz + - pip install django-2.2.7/ + - cp ci/test_mysql.py django-2.2.7/tests/ + - pip install . + + script: + - cd django-2.2.7/tests/ - ./runtests.py --parallel=1 --settings=test_mysql # vim: sw=2 ts=2 sts=2 From e459d3388398551ee8927a0107f98e81f0d47dc1 Mon Sep 17 00:00:00 2001 From: Inada Naoki Date: Fri, 29 Nov 2019 14:48:03 +0900 Subject: [PATCH 2/2] DRY --- .travis.yml | 27 ++++++++++----------------- 1 file changed, 10 insertions(+), 17 deletions(-) diff --git a/.travis.yml b/.travis.yml index 948581cb..4d3e0108 100644 --- a/.travis.yml +++ b/.travis.yml @@ -39,13 +39,15 @@ matrix: include: - &django_1_11 name: "Django 1.11 test (Python 3.7)" - python: "3.7" + env: + - DJANGO_VERSION=1.11.26 + python: "3.5" install: - pip install -U pip - - wget https://github.com/django/django/archive/1.11.26.tar.gz - - tar xf 1.11.26.tar.gz - - pip install django-1.11.26/ - - cp ci/test_mysql.py django-1.11.26/tests/ + - wget https://github.com/django/django/archive/${DJANGO_VERSION}.tar.gz + - tar xf ${DJANGO_VERSION}.tar.gz + - pip install django-${DJANGO_VERSION}/ + - cp ci/test_mysql.py django-${DJANGO_VERSION}/tests/ - pip install . before_script: @@ -54,23 +56,14 @@ matrix: - mysql_tzinfo_to_sql /usr/share/zoneinfo | mysql mysql script: - - cd django-1.11.26/tests/ + - cd django-${DJANGO_VERSION}/tests/ - ./runtests.py --parallel=1 --settings=test_mysql - &django_2_2 <<: *django_py27 name: "Django 2.2 test (Python 3.8)" python: "3.8" - install: - - pip install -U pip - - wget https://github.com/django/django/archive/2.2.7.tar.gz - - tar xf 2.2.7.tar.gz - - pip install django-2.2.7/ - - cp ci/test_mysql.py django-2.2.7/tests/ - - pip install . - - script: - - cd django-2.2.7/tests/ - - ./runtests.py --parallel=1 --settings=test_mysql + env: + - DJANGO_VERSION=2.2.7 # vim: sw=2 ts=2 sts=2