From 1bf567d66e23eab2619a9a989f9379cefa2e2e6f Mon Sep 17 00:00:00 2001 From: mShan0 Date: Tue, 24 Jan 2023 10:56:03 -0800 Subject: [PATCH 1/6] add coverage combine to linux pipeline --- azure-pipelines.yml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 3436990c..985c6d04 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -172,6 +172,9 @@ jobs: - script: tox -e $(tox.env) displayName: Run tox + - script: coverage combine /django + displayName: Combine code coverage results + - task: PublishCodeCoverageResults@1 inputs: codeCoverageTool: 'Cobertura' From e3119771530bc8f3a3960f8151451c9ec33156b9 Mon Sep 17 00:00:00 2001 From: Khanh Bui Date: Tue, 24 Jan 2023 14:22:43 -0800 Subject: [PATCH 2/6] trigger testing for the branch --- azure-pipelines.yml | 1 + 1 file changed, 1 insertion(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 985c6d04..46eca506 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -2,6 +2,7 @@ trigger: - master - dev - 1ES + - code-coverage-fix schedules: - cron: "0 9 * * *" From 083d812005cf330c4d13663959ed6f09fd3ef054 Mon Sep 17 00:00:00 2001 From: Khanh Bui Date: Tue, 24 Jan 2023 14:29:03 -0800 Subject: [PATCH 3/6] add install py3.txt --- azure-pipelines.yml | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 46eca506..53b5f5b6 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -173,7 +173,9 @@ jobs: - script: tox -e $(tox.env) displayName: Run tox - - script: coverage combine /django + - script: | + pip install -r tests/requirements/py3.txt + coverage combine /django displayName: Combine code coverage results - task: PublishCodeCoverageResults@1 From 58427d035dcfe09936c5bc3d32b32746e1968a34 Mon Sep 17 00:00:00 2001 From: Khanh Bui Date: Wed, 25 Jan 2023 10:08:06 -0800 Subject: [PATCH 4/6] install py3.txt --- azure-pipelines.yml | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index 53b5f5b6..f4ba7b30 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -174,6 +174,10 @@ jobs: displayName: Run tox - script: | + DJANGO_VERSION="$(python -m django --version)" + cd django + git fetch --depth=1 origin +refs/tags/*:refs/tags/* + git checkout $DJANGO_VERSION pip install -r tests/requirements/py3.txt coverage combine /django displayName: Combine code coverage results From 3fdb5a2c0c2e59d31b75a5e860a690452f8f1731 Mon Sep 17 00:00:00 2001 From: Khanh Bui Date: Wed, 25 Jan 2023 13:39:53 -0800 Subject: [PATCH 5/6] add coverage combine to test.sh --- azure-pipelines.yml | 9 --------- test.sh | 2 ++ 2 files changed, 2 insertions(+), 9 deletions(-) diff --git a/azure-pipelines.yml b/azure-pipelines.yml index f4ba7b30..237ca085 100644 --- a/azure-pipelines.yml +++ b/azure-pipelines.yml @@ -173,15 +173,6 @@ jobs: - script: tox -e $(tox.env) displayName: Run tox - - script: | - DJANGO_VERSION="$(python -m django --version)" - cd django - git fetch --depth=1 origin +refs/tags/*:refs/tags/* - git checkout $DJANGO_VERSION - pip install -r tests/requirements/py3.txt - coverage combine /django - displayName: Combine code coverage results - - task: PublishCodeCoverageResults@1 inputs: codeCoverageTool: 'Cobertura' diff --git a/test.sh b/test.sh index b75828ed..1d4e8daa 100755 --- a/test.sh +++ b/test.sh @@ -111,5 +111,7 @@ coverage run tests/runtests.py --settings=testapp.settings --noinput \ update \ update_only_fields +coverage combine \django + python -m coverage xml --include '*mssql*' --omit '*virtualenvs*' -o coverage.xml From 0b7a436c42acdebfaa1c3a39f17955179eb38863 Mon Sep 17 00:00:00 2001 From: Khanh Bui Date: Wed, 25 Jan 2023 15:20:19 -0800 Subject: [PATCH 6/6] edit coverage combine command --- test.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/test.sh b/test.sh index 1d4e8daa..4fb7b2fd 100755 --- a/test.sh +++ b/test.sh @@ -111,7 +111,7 @@ coverage run tests/runtests.py --settings=testapp.settings --noinput \ update \ update_only_fields -coverage combine \django +python -m coverage combine \django python -m coverage xml --include '*mssql*' --omit '*virtualenvs*' -o coverage.xml