forked from gammapy/gammapy
-
Notifications
You must be signed in to change notification settings - Fork 0
/
azure-pipelines.yml
133 lines (105 loc) · 3.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
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
# This is the configuration file for Gammapy on Azure Pipelines
variables:
GAMMAPY_DATA: $(Agent.HomeDirectory)/gammapy-data
jobs:
- job: 'Test'
strategy:
matrix:
Python36:
imageName: 'ubuntu-16.04'
python.version: '3.6'
Windows36:
imageName: 'vs2017-win2016'
python.version: '3.6'
Windows37:
imageName: 'vs2017-win2016'
python.version: '3.7'
pool:
vmImage: $(imageName)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
architecture: 'x64'
- script: |
python -m pip install --upgrade pip setuptools wheel
pip install pytest pytest-cov cython numpy astropy regions pyyaml click pytest-astropy parfive pydantic
pip install matplotlib reproject iminuit
displayName: 'Install dependencies'
- script: |
pip install -e .
python -m gammapy info
displayName: 'Install Gammapy'
- script: |
gammapy download datasets --out=$(GAMMAPY_DATA) --silent --tests
displayName: 'Get GAMMAPY_DATA'
- script: |
pytest gammapy --junitxml=junit/test-results.xml
displayName: 'Run pytest'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-results.xml'
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()
- job: 'Lint'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
architecture: 'x64'
- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin"
displayName: Add conda to PATH
- script: |
conda env create --file environment-dev.yml
source activate gammapy-dev
pip install -e .
gammapy info
displayName: 'Create gammapy-dev conda environment'
- script: |
source activate gammapy-dev
make flake8
exit 0 # allow fail
displayName: 'Run flake8'
- script: |
source activate gammapy-dev
make pylint
exit 0 # allow fail
displayName: 'Run pylint'
- script: |
source activate gammapy-dev
make pydocstyle
exit 0 # allow fail
displayName: 'Run pydocstyle'
- job: 'DevDocs'
pool:
vmImage: 'Ubuntu 16.04'
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '3.x'
architecture: 'x64'
- bash: echo "##vso[task.prependpath]/usr/share/miniconda/bin"
displayName: Add conda to PATH
- script: |
conda env create --file environment-dev.yml
source activate gammapy-dev
pip install -e .
gammapy info
displayName: 'Create gammapy-dev conda environment'
- script: |
source activate gammapy-dev
gammapy download datasets --out=$(GAMMAPY_DATA) --silent --tests
displayName: 'Get GAMMAPY_DATA'
- script: |
source activate gammapy-dev
python -m gammapy.utils.tutorials_process
displayName: 'Run tutorial Jupyter notebooks'
- script: |
source activate gammapy-dev
make docs-sphinx
displayName: 'Run Sphinx documentation build'
- script: |
echo TODO
displayName: 'Push HTML to Github pages'