This is an automated email from the ASF dual-hosted git repository.
potiuk pushed a commit to branch main
in repository https://gitbox.apache.org/repos/asf/airflow.git
The following commit(s) were added to refs/heads/main by this push:
new 2363fb562d Add random suffix to coverage reports (#33605)
2363fb562d is described below
commit 2363fb562db1abaa5bc3bc93b67c96e018c1d78a
Author: Andrey Anshin <[email protected]>
AuthorDate: Tue Aug 22 18:34:12 2023 +0400
Add random suffix to coverage reports (#33605)
* Add random suffix for coverage reports
* Minor tweaks: enable MySQL coverage, disable Helm, increase color range
---
.github/workflows/ci.yml | 3 ++-
Dockerfile.ci | 3 ++-
codecov.yml | 2 +-
scripts/docker/entrypoint_ci.sh | 3 ++-
4 files changed, 7 insertions(+), 4 deletions(-)
diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml
index b2c022c308..a716ca2f78 100644
--- a/.github/workflows/ci.yml
+++ b/.github/workflows/ci.yml
@@ -886,7 +886,7 @@ jobs:
DB_RESET: "false"
PYTHON_MAJOR_MINOR_VERSION:
"${{needs.build-info.outputs.default-python-version}}"
JOB_ID: "helm-tests"
- COVERAGE: "${{needs.build-info.outputs.run-coverage}}"
+ COVERAGE: "false" # We do not need to run coverage on Helm tests
if: >
needs.build-info.outputs.needs-helm-tests == 'true' &&
(github.repository == 'apache/airflow' || github.event_name !=
'schedule') &&
@@ -1089,6 +1089,7 @@ jobs:
MYSQL_VERSION: "${{matrix.mysql-version}}"
BACKEND_VERSION: "${{matrix.mysql-version}}"
JOB_ID: "mysql-${{matrix.mysql-version}}-${{matrix.python-version}}"
+ COVERAGE: "${{needs.build-info.outputs.run-coverage}}"
if: needs.build-info.outputs.run-tests == 'true'
steps:
- name: Cleanup repo
diff --git a/Dockerfile.ci b/Dockerfile.ci
index a4503f2d7c..25ff6f5a1d 100644
--- a/Dockerfile.ci
+++ b/Dockerfile.ci
@@ -1020,10 +1020,11 @@ else
fi
if [[ ${ENABLE_TEST_COVERAGE:="false"} == "true" ]]; then
+ _suffix="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8)"
EXTRA_PYTEST_ARGS+=(
"--cov=airflow"
"--cov-config=pyproject.toml"
- "--cov-report=xml:/files/coverage-${TEST_TYPE/\[*\]/}-${BACKEND}.xml"
+
"--cov-report=xml:/files/coverage-${TEST_TYPE/\[*\]/}-${BACKEND}-${_suffix}.xml"
)
fi
diff --git a/codecov.yml b/codecov.yml
index 3caf236b58..e78b83b582 100644
--- a/codecov.yml
+++ b/codecov.yml
@@ -25,7 +25,7 @@ codecov:
coverage:
precision: 2
round: down
- range: 55..80
+ range: 60..85
status:
project:
default:
diff --git a/scripts/docker/entrypoint_ci.sh b/scripts/docker/entrypoint_ci.sh
index f08e2eac21..67eb96defc 100755
--- a/scripts/docker/entrypoint_ci.sh
+++ b/scripts/docker/entrypoint_ci.sh
@@ -400,10 +400,11 @@ else
fi
if [[ ${ENABLE_TEST_COVERAGE:="false"} == "true" ]]; then
+ _suffix="$(head /dev/urandom | tr -dc A-Za-z0-9 | head -c 8)"
EXTRA_PYTEST_ARGS+=(
"--cov=airflow"
"--cov-config=pyproject.toml"
- "--cov-report=xml:/files/coverage-${TEST_TYPE/\[*\]/}-${BACKEND}.xml"
+
"--cov-report=xml:/files/coverage-${TEST_TYPE/\[*\]/}-${BACKEND}-${_suffix}.xml"
)
fi