Skip to content

CI: Remove powershell scripts (Azure) #30431

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 5 commits into from
Dec 24, 2019
Merged
Show file tree
Hide file tree
Changes from 4 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
11 changes: 2 additions & 9 deletions ci/azure/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -69,20 +69,13 @@ jobs:
displayName: 'Build versions'

- task: PublishTestResults@2
condition: succeededOrFailed()
Copy link
Member

Choose a reason for hiding this comment

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

Is there a particular reason to specify this instead of keeping as always?

Copy link
Member Author

@alimcmaster1 alimcmaster1 Dec 23, 2019

Choose a reason for hiding this comment

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

My understand was that suceeded() is the default condition on Azure as per docs:

By default, steps, jobs, and stages run if all previous steps/jobs have succeeded. It's as if you specified "condition: succeeded()" (see Job status functions).

And I thought we want to publish test results regardless of whether failures are produced? Or am I missing something?

Copy link
Member

Choose a reason for hiding this comment

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

My mistake. I guess ultimately my question is this versus always if it matters

Copy link
Member Author

Choose a reason for hiding this comment

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

Thanks for taking a look! Apparently always() will run even if the pipeline is cancelled -> that's the difference

inputs:
failTaskOnFailedTests: true
testResultsFiles: 'test-data.xml'
testRunTitle: ${{ format('{0}-$(CONDA_PY)', parameters.name) }}
displayName: 'Publish test results'

- powershell: |
$(Get-Content "test-data.xml" | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0) {
Write-Host "No test failures in test-data"
} else {
Write-Error "$($matches[1]) tests failed" # will produce $LASTEXITCODE=1
}
displayName: 'Check for test failures'

- script: |
source activate pandas-dev
python ci/print_skipped.py
Expand Down
19 changes: 10 additions & 9 deletions ci/azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -23,32 +23,33 @@ jobs:
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'

- bash: |
conda env create -q --file ci\\deps\\azure-windows-$(CONDA_PY).yaml
displayName: 'Create anaconda environment'

Copy link
Member Author

Choose a reason for hiding this comment

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

Making newline between each step consistent with posix.yml

- bash: |
source activate pandas-dev
conda list
ci\\incremental\\build.cmd
displayName: 'Build'

Copy link
Member

Choose a reason for hiding this comment

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

#30393 should have gotten rid of the build.cmd on L37. this isnt going to re-introduce it by accident?

Copy link
Member Author

Choose a reason for hiding this comment

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

Apologies just merged master

- bash: |
source activate pandas-dev
ci/run_tests.sh
displayName: 'Test'

- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
failTaskOnFailedTests: true
testResultsFiles: 'test-data.xml'
testRunTitle: 'Windows-$(CONDA_PY)'
- powershell: |
$(Get-Content "test-data.xml" | Out-String) -match 'failures="(.*?)"'
if ($matches[1] -eq 0) {
Write-Host "No test failures in test-data"
} else {
Write-Error "$($matches[1]) tests failed" # will produce $LASTEXITCODE=1
}
displayName: 'Check for test failures'
testRunTitle: ${{ format('{0}-$(CONDA_PY)', parameters.name) }}
displayName: 'Publish test results'

- bash: |
source activate pandas-dev
python ci/print_skipped.py
Expand Down