CI: use conda directly instead of CondaEnvironment

CondaEnvironment is deprecated.
Rewrite to follow this instruction:
https://docs.microsoft.com/en-us/azure/devops/pipelines/languages/anaconda?view=azure-devops&tabs=vs2017
This commit is contained in:
virus 2019-04-09 22:22:25 +09:00
parent 5d87fc76ef
commit 99c565c99c

View file

@ -21,27 +21,20 @@ jobs:
# Conda Environment
# Create and activate a Conda environment.
- task: CondaEnvironment@1
inputs:
packageSpecs: 'python=$(python.version) conda=4.5.11 pygments prompt_toolkit pytest pytest-timeout numpy psutil matplotlib flake8 coverage pyflakes pytest-cov pytest-flake8 codecov'
installOptions: '-c conda-forge/label/cf201901'
updateConda: false
condition: eq(variables['python.version'], '3.5')
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: Add conda to PATH
- script: 'conda create --yes --quiet --name conda-test-$(python.version) -c conda-forge/label/cf201901 python=$(python.version) conda=4.5.11 pygments prompt_toolkit pytest pytest-timeout numpy psutil matplotlib flake8 coverage pyflakes pytest-cov pytest-flake8 codecov'
displayName: 'Conda Environment (conda-forge/label/cf201901)'
- task: CondaEnvironment@1
inputs:
packageSpecs: 'python=$(python.version) pygments prompt_toolkit pytest pytest-timeout numpy psutil matplotlib flake8 coverage pyflakes pytest-cov pytest-flake8 codecov'
installOptions: '-c conda-forge/label/cf201901'
updateConda: false
condition: eq(variables['python.version'], '3.5')
- task: CondaEnvironment@1
inputs:
packageSpecs: 'python=$(python.version) pygments prompt_toolkit pytest pytest-timeout numpy psutil matplotlib flake8 coverage pyflakes pytest-cov pytest-flake8 codecov'
installOptions: '-c conda-forge'
updateConda: false
- script: |
call activate conda-test-$(python.version)
conda install --yes --quiet -c conda-forge/label/cf201901 python=$(python.version) pygments prompt_toolkit pytest pytest-timeout numpy psutil matplotlib flake8 coverage pyflakes pytest-cov pytest-flake8 codecov
condition: eq(variables['python.version'], '3.5')
- script: 'conda create --yes --quiet --name conda-test-$(python.version) -c conda-forge python=$(python.version) pygments prompt_toolkit pytest pytest-timeout numpy psutil matplotlib flake8 coverage pyflakes pytest-cov pytest-flake8 codecov'
condition: ne(variables['python.version'], '3.5')
displayName: 'Conda Environment (conda-forge)'
- script: |
call activate conda-test-$(python.version)
pip install .
xonsh run-tests.xsh --timeout=10 --junitxml=junit/test-results.xml
displayName: 'Tests'