From 22082e7c2e2846af908551acab84bfef9f531a7b Mon Sep 17 00:00:00 2001 From: Julien Langlois Date: Thu, 19 Nov 2026 16:07:21 -0700 Subject: [PATCH 1/8] SG-47353 Run the tests with the shared tk-ci-tools test jobs Replace the local OS x Python test matrix with build-pipeline.yml, listing this repository's own Python versions in run_tests_extra_parameters. Each one runs on the -latest runner images, except Python 3.9 on Linux. Points tk-ci-tools at its feature branch for testing; revert the ref to master before merging. Co-Authored-By: Claude Opus 5.5 --- azure-pipelines-templates/run-tests.yml | 196 ------------------------ azure-pipelines.yml | 72 ++++----- 2 files changed, 27 insertions(+), 241 deletions(-) delete mode 100644 azure-pipelines-templates/run-tests.yml diff --git a/azure-pipelines-templates/run-tests.yml b/azure-pipelines-templates/run-tests.yml deleted file mode 100644 index bfc4e949..00000000 --- a/azure-pipelines-templates/run-tests.yml +++ /dev/null @@ -1,196 +0,0 @@ -# ----------------------------------------------------------------------------- -# Copyright (c) 2009-2021, Shotgun Software Inc. -# -# Redistribution and use in source and binary forms, with or without -# modification, are permitted provided that the following conditions are met: -# -# - Redistributions of source code must retain the above copyright notice, this -# list of conditions and the following disclaimer. -# -# - Redistributions in binary form must reproduce the above copyright notice, -# this list of conditions and the following disclaimer in the documentation -# and/or other materials provided with the distribution. -# -# - Neither the name of the Shotgun Software Inc nor the names of its -# contributors may be used to endorse or promote products derived from this -# software without specific prior written permission. -# -# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS" -# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE -# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE ARE -# DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE LIABLE -# FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR CONSEQUENTIAL -# DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF SUBSTITUTE GOODS OR -# SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS INTERRUPTION) HOWEVER -# CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN CONTRACT, STRICT LIABILITY, -# OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE) ARISING IN ANY WAY OUT OF THE USE -# OF THIS SOFTWARE, EVEN IF ADVISED OF THE POSSIBILITY OF SUCH DAMAGE. - -parameters: - # Using the most formal way of defining parameters so we don't define a - # default value for mandatory parameters. This way, CI will fail if we forget - # to pass it when invoking the template. - - - name: codecov_download_url - type: string - - - name: os_name - type: string - - - name: python_version - type: string - - - name: vm_image - type: string - -jobs: -- job: - displayName: "${{ parameters.os_name }} - Python ${{ parameters.python_version }}" - pool: - vmImage: ${{ parameters.vm_image }} - - variables: - group: sg-credentials - - # These are the steps that will be executed inside each job. - steps: - # Specifies which version of Python we want to use. - # TODO: We should provide `githubToken` if we want to download a python release. - # Otherwise we may hit the GitHub anonymous download limit. - - task: UsePythonVersion@0 - inputs: - versionSpec: ${{ parameters.python_version }} - - # Install all dependencies needed for running the tests. This command is good - # for all OSes - - task: Bash@3 - displayName: Install dependencies - inputs: - targetType: inline - script: | - set -e - python -m pip install --upgrade pip - python -m pip install --upgrade setuptools wheel - python -m pip install --upgrade --requirement tests/requirements.txt - # Need to use the "python -m" prefix to make Windows happy. - - # The {{}} syntax is meant for the the pre-processor of Azure pipeline. Every statement inside - # a {{}} block will be evaluated and substituted before the file is parsed to create the jobs. - # So here we're inserting an extra step if the template is being invoked for Windows. - - ${{ if eq(parameters.os_name, 'Windows') }}: - # On Windows, we need to update the certificates, the cert store is missing the newer one - # from Amazon like some clients experienced a while back. Who would have thought Microsoft - # would have been out of date! ;) - - powershell: | - $cert_url = "https://www.amazontrust.com/repository/SFSRootCAG2.cer" - $cert_file = New-TemporaryFile - Invoke-WebRequest -Uri $cert_url -UseBasicParsing -OutFile $cert_file.FullName - Import-Certificate -FilePath $cert_file.FullName -CertStoreLocation Cert:\LocalMachine\Root - displayName: Updating OS Certificates - - # Runs the tests and generates both test report and code coverage - - task: Bash@3 - displayName: Running tests - inputs: - targetType: inline - script: | - set -e - cp ./tests/example_config ./tests/config - python -m pytest \ - --cov \ - --cov-report xml:coverage.xml \ - --durations=0 \ - --nunit-xml=test-results.xml \ - --verbose \ - --reruns 1 \ - --reruns-delay 2 \ - env: - # Tell Pytest that we're running in a CI environment - CI: 1 - - # Pass the values needed to authenticate with the Flow Production Tracking site and create some entities. - # Remember, on a pull request from a client or on forked repos, those variables - # will be empty! - SG_SERVER_URL: $(ci_site) - SG_SCRIPT_NAME: $(ci_site_script_name) - SG_API_KEY: $(ci_site_script_key) - # The unit tests manipulate the user and project during the tests, which can cause collisions, - # so sandbox each build variant. - # Ideally, we would use the agent name here. The problem is that the agent name is in a build - # variable, so we can't edit it's value through a ${{replace(a,b,c)}} expression, which are evaluated before - # build variables are available. Because of this, we need to find another way to generate a - # unique login. So instead, we'll use the the name of the platform and the python version, - # which should make it unique. - SG_HUMAN_LOGIN: $(python_api_human_login)-${{ parameters.os_name }}-${{ parameters.python_version }} - # This will give a user name like 'something macOS 2.7' - SG_HUMAN_NAME: $(python_api_human_name) ${{ parameters.os_name }} ${{ parameters.python_version }} - SG_HUMAN_PASSWORD: $(python_api_human_password) - # Each job gets its own ephemeral project, scoped to this build + OS + Python version. - # This eliminates state bleed between concurrent runs and across successive builds on the - # same agent. The project is retired in the "Cleanup test project" step below. - SG_PROJECT_NAME: Python API CI - $(Build.BuildId) - ${{ parameters.os_name }} - ${{ parameters.python_version }} - - - task: PythonScript@0 - displayName: Cleanup test project - condition: always() - inputs: - scriptSource: inline - workingDirectory: $(Build.SourcesDirectory) - script: | - import os, shotgun_api3, sys - sg = shotgun_api3.Shotgun( - os.environ['SG_SERVER_URL'], - script_name=os.environ['SG_SCRIPT_NAME'], - api_key=os.environ['SG_API_KEY'], - ) - project = sg.find_one( - entity_type='Project', - filters=[['name', 'is', os.environ['SG_PROJECT_NAME']]], - ) - if not project: - print('Project not found, nothing to clean up.') - sys.exit(0) - sg.delete(entity_type='Project', entity_id=project['id']) - print('Retired project:', os.environ['SG_PROJECT_NAME']) - env: - PYTHONPATH: $(Build.SourcesDirectory) - SG_SERVER_URL: $(ci_site) - SG_SCRIPT_NAME: $(ci_site_script_name) - SG_API_KEY: $(ci_site_script_key) - SG_PROJECT_NAME: Python API CI - $(Build.BuildId) - ${{ parameters.os_name }} - ${{ parameters.python_version }} - - # Explicit call to PublishTestResults@2 and PublishCodeCoverageResults@2 here - # instead of relying on pytest-azurepipelines because pytest-azurepipelines - # does not seem to be maintained anymore and is still using earlier versions - # of the PublishTestResults and PublishCodeCoverageResults Azure Pipelines - # jobs. - - - task: PublishTestResults@2 - displayName: Publish test results - inputs: - failTaskOnFailureToPublishResults: true - failTaskOnMissingResultsFile: true - testResultsFiles: test-results.xml - testResultsFormat: NUnit - testRunTitle: "${{ parameters.os_name }} - Python ${{ parameters.python_version }}" - condition: succeededOrFailed() - - - task: PublishCodeCoverageResults@2 - displayName: Publish code coverage - inputs: - summaryFileLocation: coverage.xml - failIfCoverageEmpty: true - - - task: Bash@3 - displayName: Uploading coverage to Codecov.io - inputs: - targetType: inline - script: | - set -e - curl --remote-name --silent "${{ parameters.codecov_download_url }}" - chmod +x codecov - ./codecov \ - --file coverage.xml \ - --flags "${{ parameters.os_name }}" \ - --flags "Python-${{ parameters.python_version }}" \ - --name "Tested on ${{ parameters.os_name }} with Python ${{ parameters.python_version }}" \ diff --git a/azure-pipelines.yml b/azure-pipelines.yml index dfd158cc..ee5bea10 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -31,7 +31,8 @@ resources: - repository: templates type: github name: shotgunsoftware/tk-ci-tools - ref: refs/heads/master + # Testing the tk-ci-tools branch, revert to master before merging. + ref: refs/heads/ticket/SG-47353-test-matrix-latest-images endpoint: shotgunsoftware # Despite using the "tk-" prefix, tk-ci-tools is not a Toolkit only tool. # We use it to avoid duplicating and maintaining CI pipeline code. @@ -58,55 +59,36 @@ pr: include: - "*" -parameters: - - name: python_versions - type: object - default: - - '3.9' - - '3.10' - - '3.11' - - '3.13' - - - name: os_versions - type: object - default: - - name: Linux - # Pinned: ubuntu-latest has no Python 3.9, which we still support SG-45286 - vm_image: ubuntu-24.04 - codecov_download_url: https://uploader.codecov.io/latest/linux/codecov - - - name: macOS - vm_image: macOS-latest - codecov_download_url: https://uploader.codecov.io/v0.7.3/macos/codecov - # macOS & codecov note: - # In Nov 2024 (SG-36700), we pinned macOS to codecov v0.7.3 because the - # macOS-latest Azure Pipelines agent is Intel (x86_64), but Codecov - # started shipping arm64-only binaries. - # When we will change the macOs image to a arm64 arch, we can use the - # "latest" version again. - - - name: Windows - vm_image: windows-latest - codecov_download_url: https://uploader.codecov.io/latest/windows/codecov.exe - # This here is the list of jobs we want to run for our build. # Jobs run in parallel. jobs: - template: build-pipeline.yml@templates parameters: - # Python API does not follow the exact same Python version lifecycle than - # Toolkit. So we prefer to control the test execution here instead. - has_unit_tests: false - has_ui_resources: false -- template: azure-pipelines-templates/type_checking.yml + extra_test_dependencies: + - -r tests/requirements.txt -- ${{ each os_version in parameters.os_versions }}: - - ${{ each python_version in parameters.python_versions }}: - - template: azure-pipelines-templates/run-tests.yml - parameters: - codecov_download_url: ${{ os_version.codecov_download_url }} - os_name: ${{ os_version.name }} - python_version: ${{ python_version }} - vm_image: ${{ os_version.vm_image }} + # Python API does not follow the exact same Python version lifecycle than + # Toolkit, so it lists its own Python versions. Each one runs on Linux, + # macOS and Windows with their -latest image, unless os_versions says + # otherwise. + run_tests_extra_parameters: + platform_versions: + - name: Python 3.9 + python_version: '3.9' + qt_wrapper: PySide2==5.15.2.1 + os_versions: + # ubuntu-latest (Ubuntu 26.04) does not provide Python 3.9 + Linux: ubuntu-24.04 + - name: Python 3.10 + python_version: '3.10' + qt_wrapper: PySide2==5.15.2.1 + - name: Python 3.11 + python_version: '3.11' + qt_wrapper: PySide6~=6.6.3 + - name: Python 3.13 + python_version: '3.13' + qt_wrapper: PySide6~=6.8.3 + +- template: azure-pipelines-templates/type_checking.yml From 38e100a1ee9dadd1c2d827e177a5dd7ddaaedd81 Mon Sep 17 00:00:00 2001 From: Julien Langlois Date: Thu, 19 Nov 2026 16:18:12 -0700 Subject: [PATCH 2/8] SG-47353 Use the default test platforms and document has_unit_tests The Python versions are the same as the tk-ci-tools defaults, so there is nothing to override. Keep has_unit_tests explicit to point at the shared test defaults. Co-Authored-By: Claude Opus 5.5 --- azure-pipelines.yml | 29 +++++++---------------------- 1 file changed, 7 insertions(+), 22 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index ee5bea10..c3538979 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -64,31 +64,16 @@ pr: jobs: - template: build-pipeline.yml@templates parameters: + # Run the tests with the shared tk-ci-tools test jobs. They come with a lot + # of default behavior (Python versions, Qt wrappers, operating systems and + # runner images), defined in internal/run-tests.yml of tk-ci-tools. Review + # those defaults when they change, and override them with + # run_tests_extra_parameters if this repository needs something else. + has_unit_tests: true + has_ui_resources: false extra_test_dependencies: - -r tests/requirements.txt - # Python API does not follow the exact same Python version lifecycle than - # Toolkit, so it lists its own Python versions. Each one runs on Linux, - # macOS and Windows with their -latest image, unless os_versions says - # otherwise. - run_tests_extra_parameters: - platform_versions: - - name: Python 3.9 - python_version: '3.9' - qt_wrapper: PySide2==5.15.2.1 - os_versions: - # ubuntu-latest (Ubuntu 26.04) does not provide Python 3.9 - Linux: ubuntu-24.04 - - name: Python 3.10 - python_version: '3.10' - qt_wrapper: PySide2==5.15.2.1 - - name: Python 3.11 - python_version: '3.11' - qt_wrapper: PySide6~=6.6.3 - - name: Python 3.13 - python_version: '3.13' - qt_wrapper: PySide6~=6.8.3 - - template: azure-pipelines-templates/type_checking.yml From 143c87af0a685c01cb02a9b22b2d3bcd505061a2 Mon Sep 17 00:00:00 2001 From: Julien Langlois Date: Thu, 19 Nov 2026 16:26:24 -0700 Subject: [PATCH 3/8] SG-47353 Run the tests without tk-core Otherwise the tests import the shotgun_api3 bundled with tk-core instead of this repository's code. Co-Authored-By: Claude Opus 5.5 --- azure-pipelines.yml | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c3538979..2b2856ba 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -76,4 +76,10 @@ jobs: extra_test_dependencies: - -r tests/requirements.txt + run_tests_extra_parameters: + # The Python API is not a Toolkit component. Without this, the tests + # would import the shotgun_api3 bundled with tk-core instead of this + # repository's code. + use_tk_core: false + - template: azure-pipelines-templates/type_checking.yml From f3aea12d812ec7ea3dbd3098c76379adaefb9d5c Mon Sep 17 00:00:00 2001 From: Julien Langlois Date: Mon, 23 Nov 2026 11:58:10 -0700 Subject: [PATCH 4/8] SG-47353 Run the tests against the test site again Use the new tk-ci-tools options to restore what the removed test template did: the test configuration, the site credentials with secrets mapped explicitly, a test user per OS and Python version, the Windows certificate import, the pytest reruns and the test project cleanup. Co-Authored-By: Claude Opus 5.5 --- azure-pipelines.yml | 64 +++++++++++++++++++++++++++++++++++++++++++++ 1 file changed, 64 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2b2856ba..8d44c720 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -82,4 +82,68 @@ jobs: # repository's code. use_tk_core: false + pre_tests_steps: + # The tests read the test data names from this file. The site and the + # credentials come from the SG_* variables of tests_env. + - bash: cp ./tests/example_config ./tests/config + displayName: Create the test configuration + + # The Windows certificate store is missing the newer Amazon root + # certificate, which some clients experienced too. + - powershell: | + $cert_url = "https://www.amazontrust.com/repository/SFSRootCAG2.cer" + $cert_file = New-TemporaryFile + Invoke-WebRequest -Uri $cert_url -UseBasicParsing -OutFile $cert_file.FullName + Import-Certificate -FilePath $cert_file.FullName -CertStoreLocation Cert:\LocalMachine\Root + displayName: Updating OS Certificates + condition: and(succeeded(), eq(variables['Agent.OS'], 'Windows_NT')) + + # Authenticate with the test site. On pull requests from forks, the + # secrets are not available. + tests_env: + SG_SERVER_URL: $(ci_site) + SG_SCRIPT_NAME: $(ci_site_script_name) + SG_API_KEY: $(ci_site_script_key) + # The tests modify the human user, so each job uses its own. These + # users exist on the test site, one per OS and Python version, e.g. + # -Linux-3.9. + SG_HUMAN_LOGIN: $(python_api_human_login)-$(tk_ci_os_name)-$(tk_ci_python_version) + SG_HUMAN_NAME: $(python_api_human_name) $(tk_ci_os_name) $(tk_ci_python_version) + SG_HUMAN_PASSWORD: $(python_api_human_password) + # Each job gets its own project, deleted in the cleanup step below. + SG_PROJECT_NAME: Python API CI - $(Build.BuildId) - $(tk_ci_os_name) - $(tk_ci_python_version) + + # Retry the tests that fail because of the test site. + pytest_extra_args: [--reruns, '1', --reruns-delay, '2'] + + post_tests_steps: + - task: PythonScript@0 + displayName: Cleanup test project + condition: always() + inputs: + scriptSource: inline + workingDirectory: $(Build.SourcesDirectory) + script: | + import os, shotgun_api3, sys + sg = shotgun_api3.Shotgun( + os.environ['SG_SERVER_URL'], + script_name=os.environ['SG_SCRIPT_NAME'], + api_key=os.environ['SG_API_KEY'], + ) + project = sg.find_one( + entity_type='Project', + filters=[['name', 'is', os.environ['SG_PROJECT_NAME']]], + ) + if not project: + print('Project not found, nothing to clean up.') + sys.exit(0) + sg.delete(entity_type='Project', entity_id=project['id']) + print('Retired project:', os.environ['SG_PROJECT_NAME']) + env: + PYTHONPATH: $(Build.SourcesDirectory) + SG_SERVER_URL: $(ci_site) + SG_SCRIPT_NAME: $(ci_site_script_name) + SG_API_KEY: $(ci_site_script_key) + SG_PROJECT_NAME: Python API CI - $(Build.BuildId) - $(tk_ci_os_name) - $(tk_ci_python_version) + - template: azure-pipelines-templates/type_checking.yml From b3708eee7c81292c7c13d94154dc7543aae75e39 Mon Sep 17 00:00:00 2001 From: Julien Langlois Date: Mon, 23 Nov 2026 12:12:21 -0700 Subject: [PATCH 5/8] SG-47353 Reorder the pipeline parameters Run the type checking job first so it is not lost after the test jobs, set has_ui_resources before the test parameters, and list the test dependencies in run_tests_extra_parameters with the other test settings. Co-Authored-By: Claude Opus 5.5 --- azure-pipelines.yml | 15 ++++++++------- 1 file changed, 8 insertions(+), 7 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 8d44c720..6aebf647 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -62,8 +62,13 @@ pr: # This here is the list of jobs we want to run for our build. # Jobs run in parallel. jobs: +- template: azure-pipelines-templates/type_checking.yml + - template: build-pipeline.yml@templates parameters: + # The Python API has no UI, so there are no resources to validate. + has_ui_resources: false + # Run the tests with the shared tk-ci-tools test jobs. They come with a lot # of default behavior (Python versions, Qt wrappers, operating systems and # runner images), defined in internal/run-tests.yml of tk-ci-tools. Review @@ -71,12 +76,10 @@ jobs: # run_tests_extra_parameters if this repository needs something else. has_unit_tests: true - has_ui_resources: false - - extra_test_dependencies: - - -r tests/requirements.txt - run_tests_extra_parameters: + extra_test_dependencies: + - -r tests/requirements.txt + # The Python API is not a Toolkit component. Without this, the tests # would import the shotgun_api3 bundled with tk-core instead of this # repository's code. @@ -145,5 +148,3 @@ jobs: SG_SCRIPT_NAME: $(ci_site_script_name) SG_API_KEY: $(ci_site_script_key) SG_PROJECT_NAME: Python API CI - $(Build.BuildId) - $(tk_ci_os_name) - $(tk_ci_python_version) - -- template: azure-pipelines-templates/type_checking.yml From 6ad82f97a6d57f3d19f737585ce9870658fec1fc Mon Sep 17 00:00:00 2001 From: Julien Langlois Date: Mon, 23 Nov 2026 14:16:09 -0700 Subject: [PATCH 6/8] SG-47353 Use the tk-ci-tools master branch The tk-ci-tools changes are merged. Co-Authored-By: Claude Opus 5.5 --- azure-pipelines.yml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 6aebf647..c1493182 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -31,8 +31,7 @@ resources: - repository: templates type: github name: shotgunsoftware/tk-ci-tools - # Testing the tk-ci-tools branch, revert to master before merging. - ref: refs/heads/ticket/SG-47353-test-matrix-latest-images + ref: refs/heads/master endpoint: shotgunsoftware # Despite using the "tk-" prefix, tk-ci-tools is not a Toolkit only tool. # We use it to avoid duplicating and maintaining CI pipeline code. From 740aaa229faf0fd4ade98e97dd02b9be5b1b3a6f Mon Sep 17 00:00:00 2001 From: Julien Langlois Date: Wed, 25 Nov 2026 14:30:58 -0700 Subject: [PATCH 7/8] SG-47353 Use the tk-ci-tools run_tests_parameters and toolkit flag Rename run_tests_extra_parameters and its keys to the names of the tk-ci-tools follow-up, and set toolkit to false: this repository is not a Toolkit component, so the tests need no Qt wrapper, tk-toolchain or tk-core. Point tk-ci-tools at the follow-up branch for testing. Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- azure-pipelines.yml | 26 +++++++++++++------------- 1 file changed, 13 insertions(+), 13 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index c1493182..0a7d1211 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -31,7 +31,7 @@ resources: - repository: templates type: github name: shotgunsoftware/tk-ci-tools - ref: refs/heads/master + ref: refs/heads/ticket/SG-47353-toolkit-flag endpoint: shotgunsoftware # Despite using the "tk-" prefix, tk-ci-tools is not a Toolkit only tool. # We use it to avoid duplicating and maintaining CI pipeline code. @@ -72,21 +72,21 @@ jobs: # of default behavior (Python versions, Qt wrappers, operating systems and # runner images), defined in internal/run-tests.yml of tk-ci-tools. Review # those defaults when they change, and override them with - # run_tests_extra_parameters if this repository needs something else. + # run_tests_parameters if this repository needs something else. has_unit_tests: true - run_tests_extra_parameters: - extra_test_dependencies: - - -r tests/requirements.txt + run_tests_parameters: + # The Python API is not a Toolkit component: no Qt wrapper, tk-toolchain + # or tk-core. With tk-core, the tests would import the shotgun_api3 + # bundled with tk-core instead of this repository's code. + toolkit: false - # The Python API is not a Toolkit component. Without this, the tests - # would import the shotgun_api3 bundled with tk-core instead of this - # repository's code. - use_tk_core: false + dependencies: + - -r tests/requirements.txt - pre_tests_steps: + pre_steps: # The tests read the test data names from this file. The site and the - # credentials come from the SG_* variables of tests_env. + # credentials come from the SG_* variables of env below. - bash: cp ./tests/example_config ./tests/config displayName: Create the test configuration @@ -102,7 +102,7 @@ jobs: # Authenticate with the test site. On pull requests from forks, the # secrets are not available. - tests_env: + env: SG_SERVER_URL: $(ci_site) SG_SCRIPT_NAME: $(ci_site_script_name) SG_API_KEY: $(ci_site_script_key) @@ -116,7 +116,7 @@ jobs: SG_PROJECT_NAME: Python API CI - $(Build.BuildId) - $(tk_ci_os_name) - $(tk_ci_python_version) # Retry the tests that fail because of the test site. - pytest_extra_args: [--reruns, '1', --reruns-delay, '2'] + pytest_args: [--reruns, '1', --reruns-delay, '2'] post_tests_steps: - task: PythonScript@0 From 4cb1bfe6a78298dbdca111e6ba071c796bd56816 Mon Sep 17 00:00:00 2001 From: Julien Langlois Date: Wed, 25 Nov 2026 14:41:46 -0700 Subject: [PATCH 8/8] SG-47353 Use the long pip option for the test requirements Co-authored-by: Copilot <223556219+Copilot@users.noreply.github.com> --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 0a7d1211..f43ef11a 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -82,7 +82,7 @@ jobs: toolkit: false dependencies: - - -r tests/requirements.txt + - --requirement=tests/requirements.txt pre_steps: # The tests read the test data names from this file. The site and the