1
1
Fork 0
mirror of https://github.com/pypa/pip synced 2023-12-13 21:30:23 +01:00
pip/.azure-pipelines/steps/run-tests-windows.yml

59 lines
1.7 KiB
YAML
Raw Normal View History

2018-08-24 22:09:32 +02:00
parameters:
runIntegrationTests:
useVenv: false
2018-08-24 22:09:32 +02:00
steps:
- task: UsePythonVersion@0
displayName: Use Python $(python.version)
inputs:
versionSpec: '$(python.version)'
architecture: '$(python.architecture)'
- task: PowerShell@2
inputs:
filePath: .azure-pipelines/scripts/New-RAMDisk.ps1
arguments: "-Drive R -Size 1GB"
displayName: Setup RAMDisk
- powershell: |
mkdir R:\Temp
$acl = Get-Acl "R:\Temp"
$rule = New-Object System.Security.AccessControl.FileSystemAccessRule(
"Everyone", "FullControl", "ContainerInherit,ObjectInherit", "None", "Allow"
)
$acl.AddAccessRule($rule)
Set-Acl "R:\Temp" $acl
displayName: Set RAMDisk Permissions
2019-11-10 11:49:33 +01:00
- bash: pip install --upgrade setuptools tox virtualenv
displayName: Install Tox
2018-08-24 22:09:32 +02:00
2019-10-29 07:04:55 +01:00
- script: tox -e py -- -m unit -n auto --junit-xml=junit/unit-test.xml
env:
TEMP: "R:\\Temp"
2018-08-24 22:09:32 +02:00
displayName: Tox run unit tests
- ${{ if eq(parameters.runIntegrationTests, 'true') }}:
- powershell: |
# Fix Git SSL errors
pip install certifi tox
python -m certifi > cacert.txt
$env:GIT_SSL_CAINFO = $(Get-Content cacert.txt)
# Shorten paths to get under MAX_PATH or else integration tests will fail
# https://bugs.python.org/issue18199
$env:TEMP = "R:\Temp"
2018-08-24 22:09:32 +02:00
tox -e py -- $env:USE_VENV_ARG -m integration -n auto --duration=5 --junit-xml=junit/integration-test.xml
2018-08-24 22:09:32 +02:00
displayName: Tox run integration tests
env:
${{ if eq(parameters.useVenv, 'true') }}:
USE_VENV_ARG: "--use-venv"
2018-08-24 22:09:32 +02:00
- task: PublishTestResults@2
displayName: Publish Test Results
inputs:
testResultsFiles: junit/*.xml
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()