forked from fgnt/padertorch
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathazure-pipelines.yml
61 lines (54 loc) · 1.91 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
# Python package
# Create and test a Python package on multiple Python versions.
# Add steps that analyze code, save the dist with the build record, publish to a PyPI-compatible index, and more:
# https://docs.microsoft.com/azure/devops/pipelines/languages/python
#
# See https://docs.microsoft.com/en-us/azure/devops/pipelines/agents/hosted?view=azure-devops
# for vmImage. e.g. ubuntu-18.04, ubuntu-latest, ...
# Note: ubuntu-latest is not ubuntu-18.04. But I do not know why.
trigger:
- master
strategy:
matrix:
Python36:
IMAGE_NAME: 'ubuntu-18.04'
python.version: '3.6'
Python37:
IMAGE_NAME: 'ubuntu-18.04'
python.version: '3.7'
Python38:
IMAGE_NAME: 'ubuntu-18.04'
python.version: '3.8'
pool:
vmImage: $(IMAGE_NAME)
steps:
- task: UsePythonVersion@0
inputs:
versionSpec: '$(python.version)'
displayName: 'Use Python $(python.version)'
- script: |
sudo apt-get install libsndfile1
python -m pip install --upgrade pip
# pip install -r requirements.txt
pip install numpy scipy Cython
pip install --editable .[test]
displayName: 'Install dependencies'
- script: |
pip install pytest pytest-azurepipelines
pip install pytest-cov
python -m coverage xml --include="padertorch*"
pytest --junitxml='test_results.xml' --cov=padertorch \
--doctest-modules --doctest-continue-on-failure --cov-report=html \
--ignore "padertorch/modules/wavenet/nv_wavenet" --ignore "padertorch/contrib" \
-v "tests/" "padertorch/"
displayName: 'pytest'
- task: PublishTestResults@2
condition: succeededOrFailed()
inputs:
testResultsFiles: '**/test-*.xml'
testRunTitle: 'Publish test results for Python $(python.version)'
- task: PublishCodeCoverageResults@1
inputs:
codeCoverageTool: Cobertura
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'