This repository has been archived by the owner on Nov 16, 2023. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 918
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Merge pull request #135 from microsoft/bezeran-unit-test
create unit-tests.yml
- Loading branch information
Showing
2 changed files
with
48 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,46 @@ | ||
|
||
# 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]/usr/share/miniconda/bin" | ||
displayName: Add Conda to PATH | ||
|
||
- bash: | | ||
conda remove -q -n nlp --all -y | ||
python tools/generate_conda_file.py --gpu | ||
conda env create -n nlp_gpu -f nlp_gpu.yaml | ||
conda env list | ||
source activate nlp_gpu | ||
displayName: 'Creating Conda Environment with dependencies' | ||
|
||
- bash: | | ||
source activate nlp_gpu | ||
python -m ipykernel install --user --name nlp_gpu --display-name "nlp_gpu" | ||
# Commenting out pytest since it contains bunch of tests from other project which are not applicable. | ||
# But keeping the line here to show how to run it once tests relevant to this project are added | ||
# 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' | ||
|
||
- task: ComponentGovernanceComponentDetection@0 | ||
inputs: | ||
scanType: 'Register' | ||
verbosity: 'Verbose' | ||
alertWarningLevel: 'High' |