-
Notifications
You must be signed in to change notification settings - Fork 23
/
Copy pathtemplate.yml
79 lines (65 loc) · 2.38 KB
/
template.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
75
76
77
78
79
parameters:
name: 'Conda build job'
vmImage: 'Ubuntu-18.04'
py_maj: '3'
py_min: '6'
conda_bld: '3.16.3'
jobs:
- job: ${{ parameters.name }}
timeoutInMinutes: 360
pool:
vmImage: ${{ parameters.vmImage }}
steps:
- ${{ if or(contains(parameters.vmImage, 'macOS'),contains(parameters.vmImage, 'Ubuntu')) }}:
- bash: echo "##vso[task.prependpath]$CONDA/bin"
displayName: 'Add conda to PATH'
- ${{ if contains(parameters.vmImage, 'win') }}:
- powershell: Write-Host "##vso[task.prependpath]$env:CONDA\Scripts"
displayName: 'Add conda to PATH'
- ${{ if contains(parameters.vmImage, 'macOS') }}:
- bash: |
sudo chown -R $USER $CONDA
displayName: 'MacOS ownership workaround'
- bash: |
conda config --set always_yes yes --set changeps1 no && \
conda update -q conda && \
conda info -a && \
conda config --add channels https://conda.anaconda.org/conda-forge
displayName: 'Conda config and info'
- bash: |
conda env create -n psenv -f environment.yml python=${{ parameters.py_maj }}.${{ parameters.py_min }} && \
source activate psenv && \
pip install .
displayName: Install ProcessScheduler to a dedicated environment
- bash: |
source activate psenv && \
conda install pip && \
pip install coverage
displayName: 'Install additional packages (coverage)'
- bash: |
source activate psenv && \
python -c 'from processscheduler import *'
displayName: 'Test import'
- bash: |
source activate psenv && \
python test/test-solver.py
displayName: 'Test features'
- bash: |
source activate psenv && \
python test/test-solver.py
displayName: 'Test solver results'
- bash: |
source activate psenv && \
cd doc && \
conda install sphinx sphinx_rtd_theme sphinx-autodoc-typehints nbsphinx ipykernel && \
make html
displayName: 'Build Sphinx documentation'
- ${{ if eq(parameters.name, 'Ubuntu_20_04_python39') }}:
- bash: |
source activate psenv && \
coverage run --source processscheduler test/test-features.py && \
coverage run -a --source processscheduler test/test-solver.py && \
coverage report -m && \
coverage html &&\
bash <(curl -s https://codecov.io/bash)
displayName: 'Run coverage and export report to codecov (Linux py39 only)'