Skip to content

Use bash on windows #27195

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

Closed
wants to merge 4 commits into from
Closed
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"
Copy link
Member

Choose a reason for hiding this comment

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

Is this related? If not, I think we should have it in a separate PR.

Copy link
Member Author

Choose a reason for hiding this comment

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

Okay agree - let me factor this out to a separate PR. This was part of the work to move the windows CI scripts to use bash. (FYI I'm away from my keyboard for a few weeks - but will work on this when I return)

Copy link
Contributor

Choose a reason for hiding this comment

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

can you factor this out


steps:
- powershell: |
Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
Write-Host "##vso[task.prependpath]$HOME/miniconda3/bin"
Copy link
Member Author

Choose a reason for hiding this comment

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

Correct this to miniconda dir which is $env:CONDA

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="(.*?)"'
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'