-
Notifications
You must be signed in to change notification settings - Fork 2
/
azure-pipelines.yml
74 lines (62 loc) · 2.03 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
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
trigger:
- master
pr:
autoCancel: true
branches:
include:
- master
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build for master
branches:
include:
- master
jobs:
- job: Stable
strategy:
matrix:
Python37Ubuntu:
imageName: 'ubuntu-18.04'
python.version: 3.7
Python36Ubuntu:
imageName: 'ubuntu-18.04'
python.version: 3.6
Python37macOS:
imageName: 'macOS-10.14'
python.version: 3.7
Python36macOS:
imageName: 'macOS-latest'
python.version: 3.6
pool:
vmImage: $(imageName)
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add Conda to path
# On Hosted macOS, the agent user doesn't have ownership of Miniconda's installation directory/
# We need to take ownership if we want to update conda or install packages globally
- bash: sudo chown -R $USER $CONDA
displayName: Take ownership of conda installation
condition: eq( variables['Agent.OS'], 'Darwin' )
- bash: |
conda config --set always_yes yes --set changeps1 no
conda config --add channels omnia
conda config --add channels mosdef
conda config --add channels conda-forge
conda update conda -yq
displayName: Add relevant channels
- bash: |
conda create -n test-environment
source activate test-environment
conda install --yes python=$(python.version) --file requirements-dev.txt
pip install -e .
displayName: Install requirements and testing branch
- bash: |
source activate test-environment
pip install pytest-azurepipelines
python -m pytest -v --cov=constrainmol --cov-report=html --pyargs constrainmol --no-coverage-upload
displayName: Run Tests
- bash: |
source activate test-environment
bash <(curl -s https://codecov.io/bash)
condition: and( eq( variables['Agent.OS'], 'Linux' ), eq( variables['python.version'], '3.8' ) )
displayName: Upload coverage