From 9a53d047afbc02c0aa63f973fa49b7b3363fb39a Mon Sep 17 00:00:00 2001 From: Andrey Anshin Date: Tue, 22 Aug 2023 06:09:47 +0400 Subject: [PATCH 1/2] Add random suffix for coverage reports --- Dockerfile.ci | 3 ++- scripts/docker/entrypoint_ci.sh | 3 ++- 2 files changed, 4 insertions(+), 2 deletions(-) diff --git a/Dockerfile.ci b/Dockerfile.ci index a4503f2d7cd59..25ff6f5a1def4 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/scripts/docker/entrypoint_ci.sh b/scripts/docker/entrypoint_ci.sh index f08e2eac21ace..67eb96defc2f3 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 From 06c1f0dea7e41a3501d1e96a7fc50d9e5977da8d Mon Sep 17 00:00:00 2001 From: Andrey Anshin Date: Tue, 22 Aug 2023 17:10:15 +0400 Subject: [PATCH 2/2] Minor tweaks: enable MySQL coverage, disable Helm, increase color range --- .github/workflows/ci.yml | 3 ++- codecov.yml | 2 +- 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index b2c022c308cfe..a716ca2f78d33 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/codecov.yml b/codecov.yml index 3caf236b58be9..e78b83b58206b 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: