Merge "Preparation for Django 3.0 and 3.1 support (1)"

This commit is contained in:
Zuul 2021-07-29 14:52:45 +00:00 committed by Gerrit Code Review
commit 49b79a6f30
2 changed files with 22 additions and 9 deletions

View File

@ -17,15 +17,21 @@
pre-run: playbooks/horizon-tox-django/pre.yaml
run: playbooks/horizon-tox-django/run.yaml
vars:
tox_envlist: py36
tox_envlist: py38
required-projects:
- name: openstack/horizon
- job:
name: horizon-tox-python3-django22
name: horizon-tox-python3-django30
parent: horizon-tox-python3-django
vars:
django_version: '>=2.2,<3.0'
django_version: '>=3.0,<3.1'
- job:
name: horizon-tox-python3-django31
parent: horizon-tox-python3-django
vars:
django_version: '>=3.1,<3.2'
- project-template:
name: horizon-non-primary-django-jobs
@ -37,10 +43,15 @@
# to run tests with different versions of Django.
# We specify a job in openstack-python3-xena-jobs(-horizon)
# to keep this project template as it is used in horizon plugins.
- openstack-tox-py38
# NOTE: We keep it as a template even though it is not used now.
# - horizon-tox-python3-django22
- openstack-tox-py38
- horizon-tox-python3-django30:
voting: false
- horizon-tox-python3-django31:
voting: false
gate:
jobs:
- openstack-tox-py38
# - horizon-tox-python3-django22
# Skip these until the django3.x jobs become voting.
# - horizon-tox-python3-django30
# - horizon-tox-python3-django31

View File

@ -1,6 +1,6 @@
[tox]
minversion = 3.1
envlist = pep8,py36,py38,releasenotes,npm
envlist = pep8,py36,py38,releasenotes,npm,py3-dj{30,31}
skipsdist = True
# Automatic envs (pyXX) will only use the python version appropriate to that
# env and ignore basepython inherited from [testenv] if we set
@ -13,8 +13,8 @@ usedevelop = True
setenv =
VIRTUAL_ENV = {envdir}
PYTHONDONTWRITEBYTECODE = 1
PYTHONWARNINGS = once
py{3,36,37}:PYTHONWARNINGS = once,ignore::ImportWarning:backports
PYTHONWARNINGS = once,ignore::PendingDeprecationWarning
py{3,36,37}:PYTHONWARNINGS = once,ignore::PendingDeprecationWarning,ignore::ImportWarning:backports
whitelist_externals =
bash
@ -26,6 +26,8 @@ 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
find . -type f -name "*.pyc" -delete
bash {toxinidir}/tools/unit_tests.sh {toxinidir} {posargs}