Skip to content

CI: Use bash for windows script on azure #29674

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 4 commits into from
Nov 19, 2019
Merged
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
34 changes: 15 additions & 19 deletions ci/azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -11,49 +11,45 @@ jobs:
py36_np15:
ENV_FILE: ci/deps/azure-windows-36.yaml
CONDA_PY: "36"
PATTERN: "not slow and not network"

py37_np141:
ENV_FILE: ci/deps/azure-windows-37.yaml
CONDA_PY: "37"
PATTERN: "not slow and not network"

steps:
- powershell: |
Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
Write-Host "##vso[task.prependpath]$HOME/miniconda3/bin"
displayName: 'Add conda to PATH'
- script: conda update -q -n base conda
displayName: Update conda
- script: |
call activate
displayName: 'Update conda'
- bash: |
conda env create -q --file ci\\deps\\azure-windows-$(CONDA_PY).yaml
displayName: 'Create anaconda environment'
- script: |
call activate pandas-dev
call conda list
- bash: |
source activate pandas-dev
conda list
ci\\incremental\\build.cmd
displayName: 'Build'
- script: |
call activate pandas-dev
pytest -m "not slow and not network" --junitxml=test-data.xml pandas -n 2 -r sxX --strict --durations=10 %*
- bash: |
source activate pandas-dev
ci/run_tests.sh
displayName: 'Test'
- task: PublishTestResults@2
inputs:
testResultsFiles: 'test-data.xml'
testRunTitle: 'Windows-$(CONDA_PY)'
- powershell: |
$junitXml = "test-data.xml"
$(Get-Content $junitXml | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0)
{
$(Get-Content "test-data.xml" | Out-String) -match 'failures="(.*?)"'
Copy link
Member Author

Choose a reason for hiding this comment

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

This just makes formatting of this powershell the same as posix.yml

if ($matches[1] -eq 0) {
Write-Host "No test failures in test-data"
}
else
{
# note that this will produce $LASTEXITCODE=1
Write-Error "$($matches[1]) tests failed"
} else {
Write-Error "$($matches[1]) tests failed" # will produce $LASTEXITCODE=1
}
displayName: 'Check for test failures'
- script: |
- bash: |
source activate pandas-dev
python ci/print_skipped.py
displayName: 'Print skipped tests'