From df3ffa936bc5b2b33fb1f093df98bbef5bf3462e Mon Sep 17 00:00:00 2001 From: Ajurna Date: Thu, 7 Feb 2019 15:37:40 +0000 Subject: [PATCH] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 4217c12..06c3930 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -44,13 +44,31 @@ steps: pip install unittest-xml-reporting displayName: 'Install prerequisites' +- script: | + python -m pip install flake8 + flake8 . + displayName: 'Run lint tests' + - script: | pushd '$(projectRoot)' python manage.py test --testrunner xmlrunner.extra.djangotestrunner.XMLTestRunner --no-input condition: succeededOrFailed() 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 inputs: testResultsFiles: "**/TEST-*.xml" testRunTitle: 'Python $(PYTHON_VERSION)' + +- task: PublishCodeCoverageResults@1 + inputs: + codeCoverageTool: Cobertura + summaryFileLocation: '$(System.DefaultWorkingDirectory)/**/coverage.xml' + reportDirectory: '$(System.DefaultWorkingDirectory)/**/htmlcov' \ No newline at end of file