Adding azure-pipelines.yml file to set up the build and a sample yml file to set up conda env on build machine
This commit is contained in:
Родитель
2c5b8e587e
Коммит
39d14c8665
|
@ -0,0 +1,38 @@
|
|||
|
||||
# Pull request against these branches will trigger this build
|
||||
pr:
|
||||
- master
|
||||
- staging
|
||||
|
||||
#Any commit to this branch will trigger the build.
|
||||
trigger:
|
||||
- staging
|
||||
- master
|
||||
|
||||
pool:
|
||||
vmImage: 'ubuntu-16.04'
|
||||
|
||||
steps:
|
||||
|
||||
- bash: |
|
||||
echo "##vso[task.prependpath]/data/anaconda/bin"
|
||||
displayName: Add Conda to PATH
|
||||
|
||||
- bash: |
|
||||
source deactivate nlp
|
||||
conda remove -q -n nlp --all -y
|
||||
conda env create -f environment.yml
|
||||
conda env list
|
||||
source activate nlp
|
||||
displayName: 'Build Configuration'
|
||||
|
||||
- bash: |
|
||||
source activate nlp
|
||||
python -m ipykernel install --user --name nlp --display-name "nlp"
|
||||
pytest --junitxml=junit/test-unitttest.xml #not running any tests for now
|
||||
displayName: 'Run Unit tests'
|
||||
|
||||
- task: PublishTestResults@2
|
||||
inputs:
|
||||
testResultsFiles: '**/test-unitttest.xml'
|
||||
testRunTitle: 'Test results for PyTest'
|
|
@ -0,0 +1,25 @@
|
|||
#
|
||||
# To create the conda environment:
|
||||
# $ conda env create -f environment.yml
|
||||
#
|
||||
# To update the conda environment:
|
||||
# $ conda env update -f environment.yml
|
||||
#
|
||||
# To register the conda environment in Jupyter:
|
||||
# $ conda activate nlp
|
||||
# $ python -m ipykernel install --user --name nlp
|
||||
#
|
||||
name: nlp
|
||||
channels:
|
||||
- defaults
|
||||
- conda-forge
|
||||
dependencies:
|
||||
- python==3.6.8
|
||||
- ipykernel>=4.6.1
|
||||
- jupyter>=1.0.0
|
||||
- pytest>=3.6.4
|
||||
- pip:
|
||||
- black>=18.6b4
|
||||
- papermill>=0.15.0
|
||||
- ipywebrtc
|
||||
- pre-commit>=1.14.4
|
Загрузка…
Ссылка в новой задаче