Skip to content
Open
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
9 changes: 3 additions & 6 deletions internal/run-tests-with.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,9 +12,9 @@ parameters:
# Name of the virtual machine image to load.
image_name: ""
# Name of the Qt wrapper to pip install. Should be PySide or PySide2
qt_wrapper: PySide2==5.15.2.1
qt_wrapper: ''
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the default value from 'PySide2==5.15.2.1' to an empty string could break existing callers that don't explicitly pass qt_wrapper. Consider keeping the original default or documenting that this parameter is now required.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid. I control who calls internal/run-tests-with.yml. It's only in this repository.

# Python version to use.
python_version: 3.7
python_version: ''
Copy link

Copilot AI Dec 16, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Changing the default value from '3.7' to an empty string could break existing callers that don't explicitly pass python_version. Consider keeping the original default or documenting that this parameter is now required.

Copilot uses AI. Check for mistakes.
Copy link
Member Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Invalid. I control who calls internal/run-tests-with.yml. It's only in this repository.

# List of Python packages that need to be pip installed for testing.
extra_test_dependencies: []
# Pretty name for the job.
Expand All @@ -40,13 +40,10 @@ parameters:
# - bash: do_something
# - bash: do_something_else
post_tests_steps: []
# When set to true, the agents for all platforms are set so tests can be executed
# on all platforms.
has_unit_tests: true

jobs:
- job:
displayName: ${{ parameters.job_name }} Python ${{ parameters.python_version }}
displayName: ${{ parameters.job_name }}
pool:
vmImage: ${{ parameters.image_name }}
steps:
Expand Down
175 changes: 34 additions & 141 deletions internal/run-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -35,151 +35,44 @@ parameters:
# If set to true, the build agent will run unit tests.
has_unit_tests: true

# TODO: At some point, we should review how these environments are enumerated.
# Something like:
#
# parameters:
# variants:
# Linux:
# - Qt: PySide2
# Python: 3.7
# - Qt: PyQt5
# Python: 3.7
# macOS:
# - Qt: PySide2
# Python: 3.7
# - Qt: PyQt5
# Python: 3.7
# Windows:
# - Qt: PySide2
# Python: 3.7
# - Qt: PyQt5
# Python: 3.7
#
# This would give us a better view of what variants we are running.
# Having it as a parameter would allow us also us to pick
# which builds to use for certain repositories, is necessary.

jobs:
- ${{ if eq( parameters.has_unit_tests, true ) }}:
- template: run-tests-with.yml
parameters:
image_name: 'windows-2022'
python_version: 3.9
job_name: "Windows"
# pass through all parameters
extra_test_dependencies: ${{ parameters.extra_test_dependencies }}
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
additional_repositories: ${{ parameters.additional_repositories }}
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}

- template: run-tests-with.yml
parameters:
image_name: 'macOS-14'
python_version: 3.9
job_name: "macOS"
# pass through all parameters.
extra_test_dependencies: ${{ parameters.extra_test_dependencies }}
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
additional_repositories: ${{ parameters.additional_repositories }}
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
vfx_reference_platform_versions:
- name: VFX CY2022
python_version: '3.9'
qt_wrapper: PySide2==5.15.2.1

- template: run-tests-with.yml
parameters:
image_name: 'ubuntu-22.04'
python_version: 3.9
job_name: "Linux"
# pass through all parameters.
extra_test_dependencies: ${{ parameters.extra_test_dependencies }}
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
additional_repositories: ${{ parameters.additional_repositories }}
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
- name: VFX CY2023
python_version: '3.10'
qt_wrapper: PySide2==5.15.2.1

# -------------------------
- template: run-tests-with.yml
parameters:
image_name: 'windows-2022'
python_version: 3.10
job_name: "Windows"
# pass through all parameters
extra_test_dependencies: ${{ parameters.extra_test_dependencies }}
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
additional_repositories: ${{ parameters.additional_repositories }}
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
- name: VFX CY2024
python_version: '3.11'
qt_wrapper: PySide6

- template: run-tests-with.yml
parameters:
image_name: 'macOS-14'
python_version: 3.10
job_name: "macOS"
# pass through all parameters.
extra_test_dependencies: ${{ parameters.extra_test_dependencies }}
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
additional_repositories: ${{ parameters.additional_repositories }}
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
os_versions:
- name: Windows
vm_image: windows-2022

- template: run-tests-with.yml
parameters:
image_name: 'ubuntu-22.04'
python_version: 3.10
job_name: "Linux"
# pass through all parameters.
extra_test_dependencies: ${{ parameters.extra_test_dependencies }}
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
additional_repositories: ${{ parameters.additional_repositories }}
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
- name: Linux
vm_image: ubuntu-22.04

# -------------------------
- template: run-tests-with.yml
parameters:
image_name: 'windows-2022'
python_version: 3.11
qt_wrapper: PySide6
job_name: "Windows"
# pass through all parameters
extra_test_dependencies: ${{ parameters.extra_test_dependencies }}
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
additional_repositories: ${{ parameters.additional_repositories }}
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
- name: macOS
vm_image: macOS-14
# TODO: why don't we not use the "-latest" images here like we do everywhere else? (python-api, sg-jira-bridge, ...)

- template: run-tests-with.yml
parameters:
image_name: 'macOS-14'
python_version: 3.11
qt_wrapper: PySide6
job_name: "macOS"
# pass through all parameters.
extra_test_dependencies: ${{ parameters.extra_test_dependencies }}
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
additional_repositories: ${{ parameters.additional_repositories }}
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
jobs:
- ${{ if eq( parameters.has_unit_tests, true ) }}:
- ${{ each os_version in parameters.os_versions }}:
- ${{ each platform in parameters.vfx_reference_platform_versions }}:
- template: run-tests-with.yml
parameters:
job_name: ${{ os_version.name }} Python ${{ platform.python_version }}
image_name: ${{ os_version.vm_image }}
python_version: ${{ platform.python_version }}
qt_wrapper: ${{ platform.qt_wrapper }}

- template: run-tests-with.yml
parameters:
image_name: 'ubuntu-22.04'
qt_wrapper: PySide6
python_version: 3.11
job_name: "Linux"
# pass through all parameters.
extra_test_dependencies: ${{ parameters.extra_test_dependencies }}
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
additional_repositories: ${{ parameters.additional_repositories }}
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}
has_unit_tests: ${{ parameters.has_unit_tests }}
# pass through all parameters
extra_test_dependencies: ${{ parameters.extra_test_dependencies }}
tk_toolchain_ref: ${{ parameters.tk_toolchain_ref }}
additional_repositories: ${{ parameters.additional_repositories }}
tk_core_ref: ${{ parameters.tk_core_ref }}
post_tests_steps: ${{ parameters.post_tests_steps }}