-
Notifications
You must be signed in to change notification settings - Fork 9
/
Copy pathazure-pipelines.yml
71 lines (63 loc) · 2.05 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
trigger:
- master
pr:
autoCancel: true
branches:
include:
- master
schedules:
- cron: "0 0 * * *"
displayName: Daily midnight build for master
branches:
include:
- master
always: true
jobs:
- job: NoBleeding
strategy:
matrix:
Python37Ubuntu:
imageName: 'ubuntu-latest'
python.version: 3.7
Python38Ubuntu:
imageName: 'ubuntu-latest'
python.version: 3.8
Python37macOS:
imageName: 'macOS-latest'
python.version: 3.7
Python38macOS:
imageName: 'macOS-latest'
python.version: 3.8
pool:
vmImage: $(imageName)
steps:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: Add Conda to path
- bash: sudo chown -R $USER $CONDA
condition: eq( variables['Agent.OS'], 'Darwin' )
displayName: Take ownership of conda installation
- bash: |
conda config --set always_yes yes --set changeps1 no
conda config --add channels omnia
conda config --add channels janschulz
conda config --add channels conda-forge
conda config --add channels mosdef
displayName: Add relavent Channels
- bash: |
conda update -c defaults conda
conda update --all
conda create -n test-environment
source activate test-environment
conda install --yes python=$(python.version) --file requirements-dev.txt
conda install --yes python=$(python.version) --file requirements-dev.txt
pip install -e .
displayName: Create Conda env, Activate, Install dependencies, Install Branch
- bash: |
source activate test-environment
pip install pytest-azurepipelines
python -m pytest tests/ -v
displayName: Run Tests
- bash: |
source activate test-environment
condition: and( eq( variables['Agent.OS'], 'Linux' ), eq( variables['python.version'], '3.7' ) )
displayName: Upload Coverage Report