Merge remote-tracking branch 'origin/master'

This commit is contained in:
ajurna
2019-02-07 15:46:51 +00:00

View File

@@ -10,8 +10,6 @@ pool:
vmImage: 'Ubuntu-16.04' vmImage: 'Ubuntu-16.04'
strategy: strategy:
matrix: matrix:
Python35:
PYTHON_VERSION: '3.5'
Python36: Python36:
PYTHON_VERSION: '3.6' PYTHON_VERSION: '3.6'
Python37: Python37:
@@ -46,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 --max-line-length 120 --exclude rarfile.py,migrations
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'