Skip to content

Commit

Permalink
CI: Fix setting PATH in azure pipelines (pandas-dev#27787)
Browse files Browse the repository at this point in the history
  • Loading branch information
bhavaniravi authored and quintusdias committed Aug 15, 2019
1 parent c8aeb70 commit 6792201
Show file tree
Hide file tree
Showing 3 changed files with 9 additions and 25 deletions.
22 changes: 4 additions & 18 deletions azure-pipelines.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,80 +22,67 @@ jobs:
timeoutInMinutes: 90
steps:
- script: |
# XXX next command should avoid redefining the path in every step, but
# made the process crash as it couldn't find deactivate
#echo '##vso[task.prependpath]$HOME/miniconda3/bin'
echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'
echo '##vso[task.setvariable variable=ENV_FILE]environment.yml'
echo '##vso[task.setvariable variable=AZURE]true'
displayName: 'Setting environment variables'
# Do not require a conda environment
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
ci/code_checks.sh patterns
- script: ci/code_checks.sh patterns
displayName: 'Looking for unwanted patterns'
condition: true

- script: |
export PATH=$HOME/miniconda3/bin:$PATH
sudo apt-get install -y libc6-dev-i386
ci/setup_env.sh
displayName: 'Setup environment and build pandas'
condition: true
# Do not require pandas
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/code_checks.sh lint
displayName: 'Linting'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/code_checks.sh dependencies
displayName: 'Dependencies consistency'
condition: true
# Require pandas
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/code_checks.sh code
displayName: 'Checks on imported code'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/code_checks.sh doctests
displayName: 'Running doctests'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/code_checks.sh docstrings
displayName: 'Docstring validation'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/code_checks.sh typing
displayName: 'Typing validation'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
pytest --capture=no --strict scripts
displayName: 'Testing docstring validaton script'
displayName: 'Testing docstring validation script'
condition: true
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
cd asv_bench
asv check -E existing
Expand Down Expand Up @@ -124,16 +111,15 @@ jobs:
steps:
- script: |
echo '##vso[task.setvariable variable=ENV_FILE]environment.yml'
echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'
displayName: 'Setting environment variables'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
sudo apt-get install -y libc6-dev-i386
ci/setup_env.sh
displayName: 'Setup environment and build pandas'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
# Next we should simply have `doc/make.py --warnings-are-errors`, everything else is required because the ipython directive doesn't fail the build on errors (https://github.com/ipython/ipython/issues/11547)
doc/make.py --warnings-are-errors | tee sphinx.log ; SPHINX_RET=${PIPESTATUS[0]}
Expand Down
7 changes: 2 additions & 5 deletions ci/azure/posix.yml
Original file line number Diff line number Diff line change
Expand Up @@ -56,17 +56,15 @@ jobs:
steps:
- script: |
if [ "$(uname)" == "Linux" ]; then sudo apt-get install -y libc6-dev-i386 $EXTRA_APT; fi
echo '##vso[task.prependpath]$(HOME)/miniconda3/bin'
echo "Creating Environment"
ci/setup_env.sh
displayName: 'Setup environment and build pandas'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
ci/run_tests.sh
displayName: 'Test'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
- script: source activate pandas-dev && pushd /tmp && python -c "import pandas; pandas.show_versions();" && popd
- task: PublishTestResults@2
inputs:
testResultsFiles: 'test-data-*.xml'
Expand Down Expand Up @@ -97,7 +95,6 @@ jobs:
}
displayName: 'Check for test failures'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
python ci/print_skipped.py
displayName: 'Print skipped tests'
5 changes: 3 additions & 2 deletions ci/azure/windows.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,7 +17,9 @@ jobs:
CONDA_PY: "37"

steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
- 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
Expand Down Expand Up @@ -52,7 +54,6 @@ jobs:
}
displayName: 'Check for test failures'
- script: |
export PATH=$HOME/miniconda3/bin:$PATH
source activate pandas-dev
python ci/print_skipped.py
displayName: 'Print skipped tests'

0 comments on commit 6792201

Please sign in to comment.