mirror of
https://github.com/milvus-io/milvus.git
synced 2026-07-21 10:15:43 +00:00
test: enable build-ut-cov gate on master (#50356)
Signed-off-by: Zhikun Yao <zhikun.yao@zilliz.com>
This commit is contained in:
+178
-16
@@ -55,6 +55,105 @@ misc:
|
||||
- 'status-success=ci-v2/build-ut-cov'
|
||||
- when_e2e_amd_success: &WHEN_E2E_AMD_SUCCESS
|
||||
- 'status-success=ci-v2/e2e-amd'
|
||||
- when_master_legacy_build_ut_cov_success: &WHEN_MASTER_LEGACY_BUILD_UT_COV_SUCCESS
|
||||
and:
|
||||
- or: *WHEN_BUILD_SUCCESS
|
||||
- or: *WHEN_CPP_UNIT_TEST_SUCCESS
|
||||
- or: *WHEN_GO_UNIT_TEST_SUCCESS
|
||||
- or: *WHEN_INTEGRATION_UNIT_TEST_SUCCESS
|
||||
- or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS
|
||||
- when_master_go_unit_legacy_build_ut_cov_success: &WHEN_MASTER_GO_UNIT_LEGACY_BUILD_UT_COV_SUCCESS
|
||||
and:
|
||||
- or: *WHEN_BUILD_SUCCESS
|
||||
- or: *WHEN_GO_UNIT_TEST_SUCCESS
|
||||
- or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS
|
||||
- when_master_build_ut_cov_gate_success: &WHEN_MASTER_BUILD_UT_COV_GATE_SUCCESS
|
||||
or:
|
||||
- status-success=ci-v2/build-ut-cov
|
||||
- *WHEN_MASTER_LEGACY_BUILD_UT_COV_SUCCESS
|
||||
- when_master_go_unit_build_ut_cov_gate_success: &WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_SUCCESS
|
||||
or:
|
||||
- status-success=ci-v2/build-ut-cov
|
||||
- *WHEN_MASTER_GO_UNIT_LEGACY_BUILD_UT_COV_SUCCESS
|
||||
- when_master_legacy_build_ut_cov_failure: &WHEN_MASTER_LEGACY_BUILD_UT_COV_FAILURE
|
||||
or:
|
||||
- and:
|
||||
- not:
|
||||
or:
|
||||
- 'status-success=Build and test AMD64 Ubuntu 22.04'
|
||||
- 'status-success=ci-v2/build'
|
||||
- or:
|
||||
- 'status-failure=Build and test AMD64 Ubuntu 22.04'
|
||||
- 'status-failure=ci-v2/build'
|
||||
- and:
|
||||
- not:
|
||||
or:
|
||||
- 'status-success=UT for Go'
|
||||
- 'status-success=ci-v2/ut-go'
|
||||
- or:
|
||||
- 'status-failure=UT for Go'
|
||||
- 'status-failure=ci-v2/ut-go'
|
||||
- and:
|
||||
- not:
|
||||
or:
|
||||
- 'status-success=Integration Test'
|
||||
- 'status-success=ci-v2/integration-test'
|
||||
- or:
|
||||
- 'status-failure=Integration Test'
|
||||
- 'status-failure=ci-v2/integration-test'
|
||||
- and:
|
||||
- *morethan_go_unittest_files
|
||||
- not:
|
||||
or:
|
||||
- 'status-success=cpp-unit-test'
|
||||
- 'status-success=ci-v2/ut-cpp'
|
||||
- or:
|
||||
- 'status-failure=cpp-unit-test'
|
||||
- 'status-failure=ci-v2/ut-cpp'
|
||||
- and:
|
||||
- not:
|
||||
or:
|
||||
- 'status-success=Code Checker AMD64 Ubuntu 22.04'
|
||||
- 'status-success=ci-v2/code-check'
|
||||
- or:
|
||||
- 'status-failure=Code Checker AMD64 Ubuntu 22.04'
|
||||
- 'status-failure=ci-v2/code-check'
|
||||
- when_master_go_unit_legacy_build_ut_cov_failure: &WHEN_MASTER_GO_UNIT_LEGACY_BUILD_UT_COV_FAILURE
|
||||
or:
|
||||
- and:
|
||||
- not:
|
||||
or:
|
||||
- 'status-success=Build and test AMD64 Ubuntu 22.04'
|
||||
- 'status-success=ci-v2/build'
|
||||
- or:
|
||||
- 'status-failure=Build and test AMD64 Ubuntu 22.04'
|
||||
- 'status-failure=ci-v2/build'
|
||||
- and:
|
||||
- not:
|
||||
or:
|
||||
- 'status-success=UT for Go'
|
||||
- 'status-success=ci-v2/ut-go'
|
||||
- or:
|
||||
- 'status-failure=UT for Go'
|
||||
- 'status-failure=ci-v2/ut-go'
|
||||
- and:
|
||||
- not:
|
||||
or:
|
||||
- 'status-success=Code Checker AMD64 Ubuntu 22.04'
|
||||
- 'status-success=ci-v2/code-check'
|
||||
- or:
|
||||
- 'status-failure=Code Checker AMD64 Ubuntu 22.04'
|
||||
- 'status-failure=ci-v2/code-check'
|
||||
- when_master_build_ut_cov_gate_failure: &WHEN_MASTER_BUILD_UT_COV_GATE_FAILURE
|
||||
and:
|
||||
- -status-success=ci-v2/build-ut-cov
|
||||
- status-failure=ci-v2/build-ut-cov
|
||||
- *WHEN_MASTER_LEGACY_BUILD_UT_COV_FAILURE
|
||||
- when_master_go_unit_build_ut_cov_gate_failure: &WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_FAILURE
|
||||
and:
|
||||
- -status-success=ci-v2/build-ut-cov
|
||||
- status-failure=ci-v2/build-ut-cov
|
||||
- *WHEN_MASTER_GO_UNIT_LEGACY_BUILD_UT_COV_FAILURE
|
||||
|
||||
# Branch configurations
|
||||
- branch: &BRANCHES
|
||||
@@ -106,13 +205,9 @@ pull_request_rules:
|
||||
- name: Test passed for code changed on master
|
||||
conditions:
|
||||
- *MASTER_BRANCH
|
||||
- or: *WHEN_BUILD_SUCCESS
|
||||
- *WHEN_MASTER_BUILD_UT_COV_GATE_SUCCESS
|
||||
- or: *WHEN_GO_SDK_STATUS_SUCCESS
|
||||
- or: *WHEN_CPP_UNIT_TEST_SUCCESS
|
||||
- or: *WHEN_GO_UNIT_TEST_SUCCESS
|
||||
- or: *WHEN_INTEGRATION_UNIT_TEST_SUCCESS
|
||||
- or: *WHEN_E2E_TEST_SUCCESS
|
||||
- or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS
|
||||
- or: *WHEN_CODE_CHECK_MACOS_SUCCESS
|
||||
# - 'status-success=codecov/patch'
|
||||
# - 'status-success=codecov/project'
|
||||
@@ -205,11 +300,20 @@ pull_request_rules:
|
||||
add:
|
||||
- ci-passed
|
||||
|
||||
- name: Test passed for go unittest code changed-master
|
||||
- name: Test passed for go unittest code changed on master
|
||||
conditions:
|
||||
- or:
|
||||
- *MASTER_BRANCH
|
||||
- *2X_BRANCH
|
||||
- *MASTER_BRANCH
|
||||
- *only_go_unittest_files
|
||||
- *WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_SUCCESS
|
||||
- or: *WHEN_CODE_CHECK_MACOS_SUCCESS
|
||||
actions:
|
||||
label:
|
||||
add:
|
||||
- ci-passed
|
||||
|
||||
- name: Test passed for go unittest code changed on 2.* branch
|
||||
conditions:
|
||||
- *2X_BRANCH
|
||||
- *only_go_unittest_files
|
||||
- or: *WHEN_BUILD_SUCCESS
|
||||
- or: *WHEN_CODE_CHECK_UBUNTU_SUCCESS
|
||||
@@ -252,11 +356,21 @@ pull_request_rules:
|
||||
add:
|
||||
- ci-passed
|
||||
|
||||
- name: Test passed for skip e2e when source code changed
|
||||
- name: Test passed for skip e2e when source code changed on master
|
||||
conditions:
|
||||
- or:
|
||||
- *MASTER_BRANCH
|
||||
- *2X_BRANCH
|
||||
- *MASTER_BRANCH
|
||||
- title~=\[skip e2e\]
|
||||
- *WHEN_MASTER_BUILD_UT_COV_GATE_SUCCESS
|
||||
- or: *WHEN_CODE_CHECK_MACOS_SUCCESS
|
||||
- *source_code_files
|
||||
actions:
|
||||
label:
|
||||
add:
|
||||
- ci-passed
|
||||
|
||||
- name: Test passed for skip e2e when source code changed on 2.* branch
|
||||
conditions:
|
||||
- *2X_BRANCH
|
||||
- or: *WHEN_BUILD_SUCCESS
|
||||
- title~=\[skip e2e\]
|
||||
- or: *WHEN_CPP_UNIT_TEST_SUCCESS
|
||||
@@ -321,11 +435,59 @@ pull_request_rules:
|
||||
# Handle failure scenarios during CI system migration with optimized rules
|
||||
# ==========================================================================
|
||||
|
||||
- name: Remove ci-passed when any CI system fails during migration
|
||||
- name: Remove ci-passed when any CI system fails during master build-ut-cov migration
|
||||
conditions:
|
||||
- *MASTER_BRANCH
|
||||
- label!=manual-pass
|
||||
- *source_code_files
|
||||
- or:
|
||||
- *MASTER_BRANCH
|
||||
- *2X_BRANCH
|
||||
# build-ut-cov replaces the legacy build/ut/code-check group on master:
|
||||
# remove ci-passed only when both systems indicate failure.
|
||||
- and:
|
||||
- *only_go_unittest_files
|
||||
- *WHEN_MASTER_GO_UNIT_BUILD_UT_COV_GATE_FAILURE
|
||||
- and:
|
||||
- *morethan_go_unittest_files
|
||||
- *WHEN_MASTER_BUILD_UT_COV_GATE_FAILURE
|
||||
# Code checker MacOS: remove if no success AND has failure
|
||||
- and:
|
||||
- not:
|
||||
or:
|
||||
- status-success = Code Checker MacOS 13
|
||||
- status-success = Code Checker MacOS
|
||||
- or:
|
||||
- status-failure = Code Checker MacOS 13
|
||||
- status-failure = Code Checker MacOS
|
||||
# E2E tests: remove only when E2E is required by the matching pass rule.
|
||||
- and:
|
||||
- -title~=\[skip e2e\]
|
||||
- *morethan_go_unittest_files
|
||||
- not:
|
||||
or:
|
||||
- status-success = cpu-e2e
|
||||
- status-success = ci-v2/e2e-default
|
||||
- or:
|
||||
- status-failure = cpu-e2e
|
||||
- status-failure = ci-v2/e2e-default
|
||||
# E2E tests: required case - remove if no success AND has failure (when not skipped)
|
||||
- and:
|
||||
- -title~=\[skip e2e\]
|
||||
- files~=^(?!(.*_test\.go|.*\.md|\.github\/mergify\.yml)).*$
|
||||
- not:
|
||||
or:
|
||||
- status-success = cpu-e2e
|
||||
- status-success = ci-v2/e2e-default
|
||||
- or:
|
||||
- status-failure = cpu-e2e
|
||||
- status-failure = ci-v2/e2e-default
|
||||
actions:
|
||||
label:
|
||||
remove:
|
||||
- ci-passed
|
||||
|
||||
- name: Remove ci-passed when any CI system fails during migration on 2.* branch
|
||||
conditions:
|
||||
- *2X_BRANCH
|
||||
- label!=manual-pass
|
||||
- *source_code_files
|
||||
# Comprehensive failure logic: remove ci-passed when any required system fails
|
||||
|
||||
Reference in New Issue
Block a user