Change coverage upload condition (#9552)

* change coverage upload condition

* fix typo

* set uploadCoverage

* add comment

* change coverage upload condition

* verbose version
This commit is contained in:
Brad Warren
2023-02-01 17:08:43 +11:00
committed by GitHub
parent 00f8d82808
commit 1b1b27df28
3 changed files with 9 additions and 6 deletions
+8
View File
@@ -6,5 +6,13 @@ pr:
- master
- '*.x'
variables:
# We set this here to avoid coverage data being uploaded from things like our
# nightly pipeline. This is done because codecov (helpfully) keeps track of
# the number of coverage uploads for a commit and displays a warning when
# comparing two commits with an unequal number of uploads. Only uploading
# coverage here should keep the number of uploads it sees consistent.
uploadCoverage: true
jobs:
- template: templates/jobs/standard-tests-jobs.yml
@@ -11,7 +11,6 @@ jobs:
macos-cover:
IMAGE_NAME: macOS-12
TOXENV: cover
UPLOAD_COVERAGE: 1
windows-py37:
IMAGE_NAME: windows-2019
PYTHON_VERSION: 3.7
@@ -20,12 +19,10 @@ jobs:
IMAGE_NAME: windows-2019
PYTHON_VERSION: 3.9
TOXENV: cover-win
UPLOAD_COVERAGE: 1
windows-integration-certbot:
IMAGE_NAME: windows-2019
PYTHON_VERSION: 3.9
TOXENV: integration-certbot
UPLOAD_COVERAGE: 1
linux-oldest-tests-1:
IMAGE_NAME: ubuntu-22.04
PYTHON_VERSION: 3.7
@@ -41,7 +38,6 @@ jobs:
linux-cover:
IMAGE_NAME: ubuntu-22.04
TOXENV: cover
UPLOAD_COVERAGE: 1
linux-lint:
IMAGE_NAME: ubuntu-22.04
TOXENV: lint-posix
@@ -53,7 +49,6 @@ jobs:
PYTHON_VERSION: 3.8
TOXENV: integration
ACME_SERVER: pebble
UPLOAD_COVERAGE: 1
apache-compat:
IMAGE_NAME: ubuntu-22.04
TOXENV: apache_compat
@@ -79,5 +79,5 @@ steps:
chmod +x codecov
coverage xml
./codecov || echo "Uploading coverage data failed"
condition: ne(variables['UPLOAD_COVERAGE'], '')
condition: and(eq(variables['uploadCoverage'], true), or(startsWith(variables['TOXENV'], 'cover'), startsWith(variables['TOXENV'], 'integration')))
displayName: Upload coverage data