diff --git a/eng/ci_tools.txt b/eng/ci_tools.txt index 6b7348e9adca..3315fe8a548c 100644 --- a/eng/ci_tools.txt +++ b/eng/ci_tools.txt @@ -1,7 +1,7 @@ # requirements leveraged by ci tools setuptools==44.1.0; python_version == '2.7' setuptools==45.1.0; python_version >= '3.5' -virtualenv==20.0.24 +virtualenv==20.0.23 wheel==0.34.2 Jinja2==2.11.1 packaging==20.4 @@ -33,3 +33,4 @@ pytest-cov==2.8.1 ./tools/azure-sdk-tools + diff --git a/eng/pipelines/templates/steps/build-test.yml b/eng/pipelines/templates/steps/build-test.yml index 10aad24725d2..bc8451d96b5e 100644 --- a/eng/pipelines/templates/steps/build-test.yml +++ b/eng/pipelines/templates/steps/build-test.yml @@ -26,27 +26,27 @@ steps: - template: /eng/common/pipelines/templates/steps/verify-agent-os.yml - script: | - python -m pip install -r eng/ci_tools.txt - mkdir $(Build.SourcesDirectory)/env - python -m virtualenv $(Build.SourcesDirectory)/env + python -m pip install pip == 20.1 + pip install -r eng/ci_tools.txt + pip --version displayName: 'Prep Environment' - ${{ parameters.BeforeTestSteps }} - - pwsh: | - $env:Path = "$(Build.SourcesDirectory)/env;" + $env:Path - python -m pip install pip==20.1 - python -m pip install -r eng/ci_tools.txt - python -m pip --version - - $env:PYTHON_HOME = "" - $env:VIRTUAL_ENV = "$(Build.SourcesDirectory)/env" - - Write-Host 'python ./scripts/devops_tasks/setup_execute_tests.py "${{ parameters.BuildTargetingString }}" ${{ parameters.AdditionalTestArgs }} ${{ parameters.CoverageArg }} --mark_arg="${{ parameters.TestMarkArgument }}" --service="${{ parameters.ServiceDirectory }}" --toxenv="${{ parameters.ToxTestEnv }}" --injected-packages="${{ parameters.InjectedPackages }}" ${{ parameters.ToxEnvParallel }}"' - python ./scripts/devops_tasks/setup_execute_tests.py "${{ parameters.BuildTargetingString }}" ${{ parameters.AdditionalTestArgs }} ${{ parameters.CoverageArg }} --mark_arg="${{ parameters.TestMarkArgument }}" --service="${{ parameters.ServiceDirectory }}" --toxenv="${{ parameters.ToxTestEnv }}" --injected-packages="${{ parameters.InjectedPackages }}" ${{ parameters.ToxEnvParallel }} - - env: ${{ parameters.EnvVars }} + - task: PythonScript@0 displayName: 'Run Tests' + inputs: + scriptPath: 'scripts/devops_tasks/setup_execute_tests.py' + arguments: >- + "${{ parameters.BuildTargetingString }}" + ${{ parameters.AdditionalTestArgs }} + ${{ parameters.CoverageArg }} + --mark_arg="${{ parameters.TestMarkArgument }}" + --service="${{ parameters.ServiceDirectory }}" + --toxenv="${{ parameters.ToxTestEnv }}" + --injected-packages="${{ parameters.InjectedPackages }}" + ${{ parameters.ToxEnvParallel }} + env: ${{ parameters.EnvVars }} - ${{ parameters.AfterTestSteps }}