From 83eb11204c48ed7f453fc4895a225be48f3e1cb2 Mon Sep 17 00:00:00 2001 From: Ajurna Date: Thu, 7 Feb 2019 15:22:54 +0000 Subject: [PATCH 1/3] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 -- 1 file changed, 2 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 2d74fd6..4217c12 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -10,8 +10,6 @@ pool: vmImage: 'Ubuntu-16.04' strategy: matrix: - Python35: - PYTHON_VERSION: '3.5' Python36: PYTHON_VERSION: '3.6' Python37: From df3ffa936bc5b2b33fb1f093df98bbef5bf3462e Mon Sep 17 00:00:00 2001 From: Ajurna Date: Thu, 7 Feb 2019 15:37:40 +0000 Subject: [PATCH 2/3] 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 From 76be2d80a8214d9e01a9071bb9a53db20549f51c Mon Sep 17 00:00:00 2001 From: Ajurna Date: Thu, 7 Feb 2019 15:44:46 +0000 Subject: [PATCH 3/3] Update azure-pipelines.yml for Azure Pipelines --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 06c3930..9189d9f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -46,7 +46,7 @@ steps: - script: | python -m pip install flake8 - flake8 . + flake8 --max-line-length 120 --exclude rarfile.py,migrations displayName: 'Run lint tests' - script: |