Skip to content

Commit 9c6c2f0

Browse files
author
Todd Leonhardt
committed
Added comments to azure-pipelines.yml file
Also: - Changed to build on macOS instead of Ubuntu - Make sure pytest is installed
1 parent 579dab1 commit 9c6c2f0

File tree

1 file changed

+17
-4
lines changed

1 file changed

+17
-4
lines changed

azure-pipelines.yml

Lines changed: 17 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -6,8 +6,12 @@
66
jobs:
77

88
- job: 'Test'
9+
10+
# Configure Build Environment to use Azure Pipelines to build tableformatter Python project using macOS
911
pool:
10-
vmImage: 'Ubuntu 16.04'
12+
vmImage: 'macOS 10.13' # other options 'Ubuntu 16.04', 'VS2017-Win2016'
13+
14+
# Run the pipeline with multiple Python versions
1115
strategy:
1216
matrix:
1317
Python34:
@@ -18,23 +22,32 @@ jobs:
1822
python.version: '3.6'
1923
Python37:
2024
python.version: '3.7'
25+
# Increase the maxParallel value to simultaneously run the job for all versions in the matrix (max 10 for free open-source)
2126
maxParallel: 4
2227

2328
steps:
29+
# Set the UsePythonVersion task to reference the matrix variable for its Python version
2430
- task: UsePythonVersion@0
2531
inputs:
2632
versionSpec: '$(python.version)'
2733
architecture: 'x64'
2834

35+
# Install dependencies - install specific PyPI packages with pip
2936
- script: python -m pip install --upgrade pip && pip install wcwidth
3037
displayName: 'Install dependencies'
3138

39+
# TODO: Consider adding a lint test to use flake8, pylint, or black to validate code style
40+
41+
# Test - test with pytest, collect coverage metrics with pytest-cov, and publish these metrics to codecov.io
3242
- script: |
33-
pytest
34-
displayName: 'pytest'
43+
pip install pytest pytest-cov codecov
44+
py.test --cov=tableformatter --junitxml=junit/test-results.xml --cov-report=xml --cov-report=html
45+
codecov
46+
displayName: 'Test with pytest'
3547
48+
# Publish test results to the Azure DevOps server
3649
- task: PublishTestResults@2
3750
inputs:
38-
testResultsFiles: '**/test-results.xml'
51+
testResultsFiles: '**/test-*.xml'
3952
testRunTitle: 'Python $(python.version)'
4053
condition: succeededOrFailed()

0 commit comments

Comments
 (0)