Add DevDocs job on Azure Pipelines
variables:
GAMMAPY_EXTRA: $(Agent.HomeDirectory)/gammapy-extra
- GAMMAPY_DATA: $(Agent.HomeDirectory)/gammapy-extra/datasets
+ GAMMAPY_DATA: $(Agent.HomeDirectory)/gammapy-data
jobs:
@@ -39,14 +39,22 @@ jobs:
displayName: 'Install dependencies'
- script: |
+ pip install -e .
+ python -m gammapy info
+ displayName: 'Install Gammapy'
+
+ - script: |
+ gammapy download datasets --out=$(GAMMAPY_DATA)
+ displayName: 'Get GAMMAPY_DATA'
+
+ - script: |
+ # TODO: Is gammapy-extra even needed for docs build?
# TODO: find a way to have smaller test data download to get faster CI builds
# This currently downloads 294 MB, and the `datasets` folder in master has 133 MB
git clone --depth 1 -b master https://github.com/gammapy/gammapy-extra.git $(GAMMAPY_EXTRA)
- displayName: 'Get test data'
+ displayName: 'Get GAMMAPY_EXTRA'
- script: |
- pip install -e .
- python -m gammapy info
pytest gammapy --junitxml=junit/test-results.xml
displayName: 'Run pytest'
@@ -56,7 +64,7 @@ jobs:
testRunTitle: 'Python $(python.version)'
condition: succeededOrFailed()
-# TODO: set this up using conda and our environment.yml
+
- job: 'DevDocs'
pool:
vmImage: 'Ubuntu 16.04'
@@ -66,3 +74,39 @@ jobs:
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)
+ displayName: 'Get GAMMAPY_DATA'
+
+ - script: |
+ # TODO: Is gammapy-extra even needed for docs build?
+ # TODO: find a way to have smaller test data download to get faster CI builds
+ # This currently downloads 294 MB, and the `datasets` folder in master has 133 MB
+ git clone --depth 1 -b master https://github.com/gammapy/gammapy-extra.git $(GAMMAPY_EXTRA)
+ displayName: 'Get GAMMAPY_EXTRA'
+
+ - script: |
+ source activate gammapy-dev
+ python -m gammapy.utils.tutorials_process
+ displayName: 'Run tutorial Jupyter notebooks'
+
+ - script: |
+ source activate gammapy-dev
+ python setup.py build_docs
+ displayName: 'Run Sphinx documentation build'
+
+ - script: |
+ echo TODO
+ displayName: 'Push HTML to Github pages'
