Preparation for Django 3.2 support

This commit adds a non-voting unit test job with Django 3.2.

Jobs with Django 3.0 and 3.1 are dropped now.
They were introduced before Django 3.2 was released.
Django 3.0 reached EOL and Django 3.1 will reach EOL this December.
Django 3.2 is an LTS version so testing with Django 3.2 is enough.

Change-Id: Ic6ba0ea281b287b7f4762f92e2e81a6fd654da8f
This commit is contained in:
Akihiro Motoki 2021-02-24 22:58:06 +09:00
parent 39f28ad5ed
commit f3d2b9d540
2 changed files with 11 additions and 16 deletions

View File

@ -22,16 +22,10 @@
- name: openstack/horizon
- job:
name: horizon-tox-python3-django30
name: horizon-tox-python3-django32
parent: horizon-tox-python3-django
vars:
django_version: '>=3.0,<3.1'
- job:
name: horizon-tox-python3-django31
parent: horizon-tox-python3-django
vars:
django_version: '>=3.1,<3.2'
django_version: '>=3.2,<3.3'
- project-template:
name: horizon-non-primary-django-jobs
@ -45,13 +39,10 @@
# to keep this project template as it is used in horizon plugins.
# NOTE: We keep it as a template even though it is not used now.
- openstack-tox-py38
- horizon-tox-python3-django30:
voting: false
- horizon-tox-python3-django31:
- horizon-tox-python3-django32:
voting: false
gate:
jobs:
- openstack-tox-py38
# Skip these until the django3.x jobs become voting.
# - horizon-tox-python3-django30
# - horizon-tox-python3-django31
# - horizon-tox-python3-django32

10
tox.ini
View File

@ -1,6 +1,6 @@
[tox]
minversion = 3.1
envlist = pep8,py36,py38,releasenotes,npm,py3-dj{30,31}
envlist = pep8,py36,py38,releasenotes,npm,py3-dj32
skipsdist = True
# Automatic envs (pyXX) will only use the python version appropriate to that
# env and ignore basepython inherited from [testenv] if we set
@ -15,6 +15,11 @@ setenv =
PYTHONDONTWRITEBYTECODE = 1
PYTHONWARNINGS = once,ignore::PendingDeprecationWarning
py{3,36,37}:PYTHONWARNINGS = once,ignore::PendingDeprecationWarning,ignore::ImportWarning:backports
# DeprecationWarning is disabled in dj32 tox env as Django 3.2
# deprecated Django 2.2 features. This workaround is just to reduce
# the number of warnings due to this change.
# It should be dropped when we drop Django 2.2 support.
dj32: PYTHONWARNINGS = once,ignore::PendingDeprecationWarning,ignore::DeprecationWarning
whitelist_externals =
bash
@ -26,8 +31,7 @@ deps =
# Unit test for a local hacking rule requires hacking.
hacking>=3.0.1,<3.1.0 # Apache-2.0
commands =
dj30: pip install django>=3.0,<3.1
dj31: pip install django>=3.1,<3.2
dj32: pip install django>=3.2,<3.3
find . -type f -name "*.pyc" -delete
bash {toxinidir}/tools/unit_tests.sh {toxinidir} {posargs}