Files
horizon/.zuul.d/django-jobs.yaml
Akihiro Motoki 40e416b8fc Add unit tests with Django 4.2
Django 4.2 is our primary version in 2023.2 (Caracal),
so we need to start testing with Django 4.2.
Once all unit tests work, let's switch it to voting.

PYTHONWARNINGS in tox.ini is also simplified. We had three similar
variants of PYTHONWARNINGS in tox.ini. There is no need to use a
different value for py3 and py39 as we already use py39 by default.
PendingDeprecationWarning was added to hide Django deprecation
warnings, so I keep it now. On the other hand I think we should
handle Django deprecation warnings much earlier to sync Django
releases more promptly, so TODO comment is added.

Change-Id: I530be8fde637a912968b4ce7dbc94a4108dc50df
2023-10-19 22:13:22 +09:00

57 lines
1.9 KiB
YAML

- job:
name: horizon-tox-python3-django
abstract: true
parent: horizon-openstack-tox-base
description: |
Run tox with different Django version.
.. zuul:jobvar: tox_envlist
Which tox environment to run
.. zuul:jobvar: django_version
Django version to be used.
pip version specifier like ``>=4.2,<4.3`` should be passed.
pre-run: playbooks/horizon-tox-django/pre.yaml
run: playbooks/horizon-tox-django/run.yaml
vars:
tox_envlist: py311
# The following should match the base openstack-tox-pyNN job.
bindep_profile: test py311
python_version: "3.11"
required-projects:
- name: openstack/horizon
# Let's keep at least one job definition as a template even when we support
# only one version of Django covered by the default job.
- job:
name: horizon-tox-python3-django42
parent: horizon-tox-python3-django
vars:
django_version: '>=4.2,<4.3'
- project-template:
name: horizon-non-primary-django-jobs
description: |
Run unit tests with non-primary Django versions.
check:
jobs:
# We specify a job in openstack-python3-jobs(-horizon) as a
# sentinel to make this project template valid even when we support
# only one version of Django used as the default. Zuul project
# template configuration requires at least one job included.
- openstack-tox-py311
# Let's keep at least one job as a template even when we support
# only one version of Django covered by the default job.
# Just comment it out for such case.
- horizon-tox-python3-django42:
voting: false
gate:
jobs:
# Default python job in openstack-python3-antelope-jobs(-horizon)
- openstack-tox-py311
# Skip the following until they become voting.
# - horizon-tox-python3-django42