From fa94e3c1b2a62f8eb39f37cdb6737b88391221f2 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Sat, 2 Mar 2019 00:50:31 +0100 Subject: [PATCH 1/2] ci: Azure: fix coverage generation with PyPy While this is not used currently, it is still good for having it covered (it failed when running coverage with all jobs unconditionally). --- azure-pipelines.yml | 5 +++++ scripts/upload-coverage.bat | 10 +++++----- 2 files changed, 10 insertions(+), 5 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index b648cd3d9..68f10d33f 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -37,6 +37,10 @@ jobs: python.version: 'pypy' tox.env: 'pypy' python.exe: 'pypy' + pypy3: + python.version: 'pypy3' + tox.env: 'pypy3' + python.exe: 'pypy3' py34: python.version: '3.4' tox.env: 'py34' @@ -115,5 +119,6 @@ jobs: displayName: 'Upload coverage' condition: eq(variables['PYTEST_COVERAGE'], '1') env: + PYTHON: $(python.exe) CODECOV_TOKEN: $(CODECOV_TOKEN) PYTEST_CODECOV_NAME: $(tox.env) diff --git a/scripts/upload-coverage.bat b/scripts/upload-coverage.bat index 6a4773e18..b21e0126e 100644 --- a/scripts/upload-coverage.bat +++ b/scripts/upload-coverage.bat @@ -6,11 +6,11 @@ if "%PYTEST_COVERAGE%" == "1" ( ) else ( echo CODECOV_TOKEN NOT defined ) - python -m pip install codecov - coverage combine - coverage xml - coverage report -m - scripts\retry codecov --required -X gcov pycov search -f coverage.xml --name %PYTEST_CODECOV_NAME% + %PYTHON% -m pip install codecov + %PYTHON% -m coverage combine + %PYTHON% -m coverage xml + %PYTHON% -m coverage report -m + scripts\retry %PYTHON% -m codecov --required -X gcov pycov search -f coverage.xml --name %PYTEST_CODECOV_NAME% ) else ( echo Skipping coverage upload, PYTEST_COVERAGE=%PYTEST_COVERAGE% ) From 2e871f35f3c82f79b8cb94fef29273d4d0706f36 Mon Sep 17 00:00:00 2001 From: Daniel Hahler Date: Mon, 4 Mar 2019 17:51:25 +0100 Subject: [PATCH 2/2] ci: Azure: clarify name for coverage job --- azure-pipelines.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 68f10d33f..b2ea65245 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -116,7 +116,7 @@ jobs: condition: succeededOrFailed() - script: call scripts\upload-coverage.bat - displayName: 'Upload coverage' + displayName: 'Report and upload coverage' condition: eq(variables['PYTEST_COVERAGE'], '1') env: PYTHON: $(python.exe)