mirror of
https://github.com/ajurna/cbwebreader.git
synced 2025-12-06 14:17:19 +00:00
Update azure-pipelines.yml for Azure Pipelines
This commit is contained in:
@@ -44,13 +44,31 @@ steps:
|
|||||||
pip install unittest-xml-reporting
|
pip install unittest-xml-reporting
|
||||||
displayName: 'Install prerequisites'
|
displayName: 'Install prerequisites'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
python -m pip install flake8
|
||||||
|
flake8 .
|
||||||
|
displayName: 'Run lint tests'
|
||||||
|
|
||||||
- script: |
|
- script: |
|
||||||
pushd '$(projectRoot)'
|
pushd '$(projectRoot)'
|
||||||
python manage.py test --testrunner xmlrunner.extra.djangotestrunner.XMLTestRunner --no-input
|
python manage.py test --testrunner xmlrunner.extra.djangotestrunner.XMLTestRunner --no-input
|
||||||
condition: succeededOrFailed()
|
condition: succeededOrFailed()
|
||||||
displayName: 'Run tests'
|
displayName: 'Run tests'
|
||||||
|
|
||||||
|
- script: |
|
||||||
|
pip install pytest
|
||||||
|
pip install pytest-cov
|
||||||
|
pytest tests --doctest-modules --junitxml=junit/test-results.xml --cov=com --cov-report=xml --cov-report=html
|
||||||
|
displayName: 'Test with pytest'
|
||||||
|
|
||||||
|
|
||||||
- task: PublishTestResults@2
|
- task: PublishTestResults@2
|
||||||
inputs:
|
inputs:
|
||||||
testResultsFiles: "**/TEST-*.xml"
|
testResultsFiles: "**/TEST-*.xml"
|
||||||
testRunTitle: 'Python $(PYTHON_VERSION)'
|
testRunTitle: 'Python $(PYTHON_VERSION)'
|
||||||
|
|
||||||
|
- task: PublishCodeCoverageResults@1
|
||||||
|
inputs:
|
||||||
|
codeCoverageTool: Cobertura
|
||||||
|
summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml'
|
||||||
|
reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov'
|
||||||
Reference in New Issue
Block a user