- job:
    name: horizon-integration-pytest
    parent: devstack
    nodeset: devstack-single-node-debian-bookworm
    pre-run: playbooks/horizon-devstack-integration/pre.yaml
    run: playbooks/horizon-devstack-integration/run.yaml
    post-run: playbooks/horizon-devstack-integration/post.yaml
    roles:
      - zuul: openstack-infra/devstack
    required-projects:
      - openstack/horizon
      - openstack/requirements
    irrelevant-files:
      - ^.*\.rst$
      - ^doc/.*$
      - ^releasenotes/.*$
      - ^.*/locale/.*$
      # Unit tests are not related to the integration tests
      - ^horizon/test/unit/.*$
      - ^openstack_auth/tests/unit/.*$
      - ^openstack_dashboard/test/unit/.*$
      - ^openstack_dashboard/contrib/.*/tests.py$
      - ^openstack_dashboard/dashboards/.*/tests.py$
      # JavaScript unit tests are not related to the integration tests
      - ^openstack_dashboard/.*/[^/]*\.spec\.js$
      - ^horizon/static/.*/[^/]*\.spec\.js$
    vars:
      devstack_services:
        horizon: true
      tox_envlist: integration-pytest
      tox_constraints_file: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"

- job:
    name: horizon-ui-pytest
    parent: devstack
    nodeset: devstack-single-node-debian-bookworm
    pre-run: playbooks/horizon-devstack-integration/pre.yaml
    run: playbooks/horizon-devstack-integration/run.yaml
    post-run: playbooks/horizon-devstack-integration/post.yaml
    roles:
      - zuul: openstack-infra/devstack
    required-projects:
      - openstack/horizon
      - openstack/requirements
    irrelevant-files:
      - ^.*\.rst$
      - ^doc/.*$
      - ^releasenotes/.*$
      - ^.*/locale/.*$
      # Unit tests are not related to the integration tests
      - ^horizon/test/unit/.*$
      - ^openstack_auth/tests/unit/.*$
      - ^openstack_dashboard/test/unit/.*$
      - ^openstack_dashboard/contrib/.*/tests.py$
      - ^openstack_dashboard/dashboards/.*/tests.py$
      # JavaScript unit tests are not related to the integration tests
      - ^openstack_dashboard/.*/[^/]*\.spec\.js$
      - ^horizon/static/.*/[^/]*\.spec\.js$
    vars:
      devstack_services:
        horizon: true
      tox_envlist: ui-pytest
      tox_constraints_file: "{{ ansible_user_dir }}/{{ zuul.projects['opendev.org/openstack/requirements'].src_dir }}/upper-constraints.txt"

- job:
    name: horizon-dsvm-tempest-plugin
    parent: devstack-tempest
    required-projects: &base_required_projects
      - name: openstack/horizon
      - name: openstack/tempest
    irrelevant-files: &base_irrelevant_files
      - ^.*\.rst$
      - ^doc/.*$
      - ^releasenotes/.*$
      - ^.*/locale/.*$
      # Test codes are not related to tempest tests
      # as tempest is defined in a separete repository
      - ^horizon/test/.*$
      - ^openstack_auth/tests/.*$
      - ^openstack_dashboard/test/.*$
      - ^openstack_dashboard/contrib/.*/tests.py$
      - ^openstack_dashboard/dashboards/.*/tests.py$
      # JavaScript unit tests are not related to tempest tests
      - ^openstack_dashboard/.*/[^/]*\.spec\.js$
      - ^horizon/static/.*/[^/]*\.spec\.js$
    vars: &base_vars
      devstack_services:
        horizon: true
        tempest: true
      tempest_concurrency: 2
      tempest_test_regex: test_dashboard_basic_ops
      tox_envlist: all

# TODO(gmann): As per the 2025.1 testing runtime, we need to run at least
# one job on jammy. This job can be removed in the next cycle(2025.2)
- job:
    name: horizon-dsvm-tempest-plugin-ubuntu-jammy
    description: This is integrated compute job testing on Ubuntu jammy(22.04)
    parent: horizon-dsvm-tempest-plugin
    nodeset: openstack-single-node-jammy

- job:
    name: horizon-tempest-plugin-ipv6
    parent: devstack-tempest-ipv6
    required-projects: *base_required_projects
    irrelevant-files: *base_irrelevant_files
    vars: *base_vars
