From f4679b943511f9c1fc778fd0f18df7abceaef1af Mon Sep 17 00:00:00 2001 From: Scott Beddall <45376673+scbedd@users.noreply.github.com> Date: Wed, 22 Sep 2021 12:20:07 -0700 Subject: [PATCH] Add 3.10 to Nightly Edge Build (#20623) * update nightly edge build to run python 3.10 on both windows and linux agents * conditionally update `pytest` requirements in both ci_tools.txt and test_tools.txt for python 3.10 * conditionally add some necessary python 3.10 windows wheels to test_tools.txt. These additions only affect python 3.10, which is not currently part of the test matrix --- eng/ci_tools.txt | 3 +- .../templates/jobs/tests-nightly-python.yml | 78 ++++++++++++++++++- eng/test_tools.txt | 9 ++- 3 files changed, 87 insertions(+), 3 deletions(-) diff --git a/eng/ci_tools.txt b/eng/ci_tools.txt index 36e7bf77e072..778e2d256aab 100644 --- a/eng/ci_tools.txt +++ b/eng/ci_tools.txt @@ -28,8 +28,9 @@ json-delta==2.0 ConfigArgParse==1.2.3 six==1.14.0 pyyaml==5.3.1 -pytest==5.4.2; python_version >= '3.5' pytest==4.6.9; python_version == '2.7' +pytest==5.4.2; python_version >= '3.5' and python_version <= '3.9' +pytest==6.2.4; python_version >= '3.10' pytest-cov==2.8.1 # local dev packages diff --git a/eng/pipelines/templates/jobs/tests-nightly-python.yml b/eng/pipelines/templates/jobs/tests-nightly-python.yml index 2c2675e2b658..85245bf137f7 100644 --- a/eng/pipelines/templates/jobs/tests-nightly-python.yml +++ b/eng/pipelines/templates/jobs/tests-nightly-python.yml @@ -3,7 +3,83 @@ trigger: jobs: + - job: Validate_RC_Python_Build_Windows + displayName: Validate Release Candidate Python - Windows + variables: + skipComponentGovernanceDetection: true + PythonVersion: '3.10.0-rc.2' + + timeoutInMinutes: 90 + + pool: + vmImage: 'windows-2019' + + steps: + - template: /eng/pipelines/templates/steps/use-python-version.yml + parameters: + versionSpec: $(PythonVersion) + + - script: | + python -m pip freeze + python -m pip --version + pip install setuptools==56.0.0 wheel==0.37.0 tox==3.24.3 tox-monorepo==0.1.2 packaging==21.0 + displayName: Install Dependencies + + - script: | + python ./scripts/devops_tasks/setup_execute_tests.py "$(BuildTargetingString)" --junitxml="junit/test_results.xml" --toxenv="whl" + displayName: 'Setup - Run Filtered Tests For Python $(PythonVersion)' + env: + YARL_NO_EXTENSIONS: 1 + continueOnError: true + + - task: PublishTestResults@2 + condition: always() + inputs: + testResultsFiles: '**/*test*.xml' + testRunTitle: 'Python $(PythonVersion)' + failTaskOnFailedTests: true + + - job: Validate_RC_Python_Build_Linux + displayName: Validate Release Candidate Python - Linux + variables: + skipComponentGovernanceDetection: true + PythonVersion: '3.10.0-rc.2' + + timeoutInMinutes: 90 + + pool: + vmImage: 'ubuntu-18.04' + + steps: + - template: /eng/pipelines/templates/steps/use-python-version.yml + parameters: + versionSpec: $(PythonVersion) + + - script: | + python -m pip freeze + python -m pip --version + pip install setuptools==56.0.0 wheel==0.37.0 tox==3.24.3 tox-monorepo==0.1.2 packaging==21.0 + displayName: Install Dependencies + + - script: | + find /usr/lib -name "libffi.so*" + ln -s /usr/lib/x86_64-linux-gnu/libffi.so.7 /usr/lib/x86_64-linux-gnu/libffi.so.6 + + python ./scripts/devops_tasks/setup_execute_tests.py "$(BuildTargetingString)" --junitxml="junit/test_results.xml" --toxenv="whl" + displayName: 'Setup - Run Filtered Tests For Python $(PythonVersion)' + env: + YARL_NO_EXTENSIONS: 1 + continueOnError: true + + - task: PublishTestResults@2 + condition: always() + inputs: + testResultsFiles: '**/*test*.xml' + testRunTitle: 'Python $(PythonVersion)' + failTaskOnFailedTests: true + - job: Validate_Nightly_Python_Build + displayName: Validate Nightly Dev Python Build variables: skipComponentGovernanceDetection: true @@ -48,5 +124,5 @@ jobs: condition: always() inputs: testResultsFiles: '**/junit/test-results.xml' - testRunTitle: '$(OSName) Python $(PythonVersion)' + testRunTitle: 'Python Nightly' failTaskOnFailedTests: true diff --git a/eng/test_tools.txt b/eng/test_tools.txt index 27baeebf2d50..3c37cd630556 100644 --- a/eng/test_tools.txt +++ b/eng/test_tools.txt @@ -1,8 +1,15 @@ pip==20.3 +# manually published packages +https://docsupport.blob.core.windows.net/repackaged/cffi-1.14.6-cp310-cp310-win_amd64.whl; sys_platform=='win32' and python_version >= '3.10' +https://docsupport.blob.core.windows.net/repackaged/multidict-5.1.0-cp310-cp310-win_amd64.whl; sys_platform=='win32' and python_version >= '3.10' +https://docsupport.blob.core.windows.net/repackaged/pywin32-301.1-cp310-cp310-win_amd64.whl; sys_platform=='win32' and python_version >= '3.10' +https://docsupport.blob.core.windows.net/repackaged/yarl-1.6.3-cp310-cp310-win_amd64.whl; sys_platform=='win32' and python_version >= '3.10' + # requirements leveraged by ci for testing pytest==4.6.9; python_version == '2.7' -pytest==5.4.2; python_version >= '3.5' +pytest==5.4.2; python_version >= '3.5' and python_version <= '3.9' +pytest==6.2.4; python_version >= '3.10' pytest-asyncio==0.12.0; python_version >= '3.5' pytest-cov==2.8.1 pytest-custom-exit-code==0.3.0