Update gpu_unit_tests_linux.yml

This commit is contained in:
Miguel González-Fierro 2019-07-23 16:24:26 +01:00 коммит произвёл GitHub
Родитель f01c77853c
Коммит 849f3112cb
Не найден ключ, соответствующий данной подписи
Идентификатор ключа GPG: 4AEE18F83AFDEB23
1 изменённых файлов: 38 добавлений и 29 удалений

Просмотреть файл

@ -6,39 +6,48 @@ pr:
- master
- staging
pool:
name: "nlptestmachine"
#Any commit to this branch will trigger the build.
trigger:
- staging
- master
steps:
jobs:
- job: gpu_unit_tests_linux
timeoutInMinutes: 10 # how long to run the job before automatically cancelling
pool:
name: nlpagentpool
- bash: |
echo "##vso[task.prependpath]/data/anaconda/bin"
displayName: Add Conda to PATH
steps:
- bash: |
echo "##vso[task.prependpath]/data/anaconda/bin"
displayName: Add Conda to PATH
- bash: |
python tools/generate_conda_file.py --gpu
conda env create -n nlp_gpu -f nlp_gpu.yaml
displayName: 'Creating Conda Environment with dependencies'
# Uncomment if needed
# - bash: |
# python tools/generate_conda_file.py --gpu
# conda env create -n nlp_gpu -f nlp_gpu.yaml
# displayName: 'Creating Conda Environment with dependencies'
- bash: |
source activate nlp_gpu
pytest tests/unit -m "not notebooks and gpu" --junitxml=junit/test-unitttest.xml
displayName: 'Run Unit tests'
- bash: |
source activate nlp_gpu
pytest tests/unit -m "not notebooks and gpu" --junitxml=junit/test-unitttest.xml
displayName: 'Run Unit tests'
- bash: |
echo Remove Conda Environment
conda remove -n nlp_gpu --all -q --force -y
echo Done Cleanup
displayName: 'Cleanup Task'
condition: always()
# Uncomment if needed
# - bash: |
# echo Remove Conda Environment
# conda remove -n nlp_gpu --all -q --force -y
# echo Done Cleanup
# displayName: 'Cleanup Task'
# condition: always()
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-unitttest.xml'
testRunTitle: 'Test results for PyTest'
- task: PublishTestResults@2
inputs:
testResultsFiles: '**/test-unitttest.xml'
testRunTitle: 'Test results for PyTest'
- task: ComponentGovernanceComponentDetection@0
inputs:
scanType: 'Register'
verbosity: 'Verbose'
alertWarningLevel: 'High'
- task: ComponentGovernanceComponentDetection@0
inputs:
scanType: 'Register'
verbosity: 'Verbose'
alertWarningLevel: 'High'