forked from Niemeyer-Research-Group/pyMARS
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
40 lines (34 loc) · 1.17 KB
/
azure-pipelines.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
jobs:
- job:
displayName: vs2017-win2016
pool:
vmImage: 'vs2017-win2016'
strategy:
matrix:
Python36:
python.version: '3.6'
Python37:
python.version: '3.7'
steps:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: 'Add conda to PATH'
- script: |
call activate
conda config --set always_yes yes --set changeps1 no
conda config --append channels conda-forge
conda update conda
conda update -q --all
displayName: 'Install Anaconda Packages'
- powershell: (get-content test-environment.yaml) | %{$_ -replace "\$\{PYTHON\}","$(python.version)"} | set-content test-environment.yaml
displayName: 'Set appropriate Python version in environment file'
- script: |
conda env create --quiet --file test-environment.yaml
call activate py$(python.version)
conda info -a
conda list -n py$(python.version)
displayName: 'Create Anaconda environment and list packages'
- script: |
call activate py$(python.version)
pip install pytest-cov pytest-azurepipelines
pytest -v --cov=./ --cov-report html
displayName: 'test with pytest'