diff --git a/.github/workflows/CI.yml b/.github/workflows/CI.yml index 95b938cbb..eba09d610 100644 --- a/.github/workflows/CI.yml +++ b/.github/workflows/CI.yml @@ -15,6 +15,8 @@ env: UI_BUILDER_VERSION: 1.6.0 on: + # the paths-ignore is the same as the paths in pass-CI.yml, they should be synced together + # see https://web.archive.org/web/20230506145443/https://docs.github.com/en/repositories/configuring-branches-and-merges-in-your-repository/managing-protected-branches/troubleshooting-required-status-checks#handling-skipped-but-required-checks pull_request: paths-ignore: - 'docs/**' @@ -23,7 +25,11 @@ on: - '!tests/**.sh' - '!tests/apitests/**' - '!tests/ci/**' + - '!tests/resources/**' + - '!tests/robot-cases/**' + - '!tests/robot-cases/Group1-Nightly/**' push: + # the paths-ignore is the same as the paths in pass-CI.yml, they should be synced together paths-ignore: - 'docs/**' - '**.md' @@ -31,6 +37,9 @@ on: - '!tests/**.sh' - '!tests/apitests/**' - '!tests/ci/**' + - '!tests/resources/**' + - '!tests/robot-cases/**' + - '!tests/robot-cases/Group1-Nightly/**' jobs: UTTEST: @@ -349,4 +358,4 @@ jobs: uses: codecov/codecov-action@v5 with: files: ./src/github.com/goharbor/harbor/src/portal/coverage/lcov.info - flags: unittests + flags: unittests \ No newline at end of file diff --git a/.github/workflows/pass-CI.yml b/.github/workflows/pass-CI.yml index a54567f61..0669218cb 100644 --- a/.github/workflows/pass-CI.yml +++ b/.github/workflows/pass-CI.yml @@ -2,6 +2,7 @@ name: CI on: pull_request: + # the paths is the same as the paths-ignore in CI.yml, they should be synced together paths: - 'docs/**' - '**.md' @@ -13,6 +14,7 @@ on: - '!tests/robot-cases/**' - '!tests/robot-cases/Group1-Nightly/**' push: + # the paths is the same as the paths-ignore in CI.yml, they should be synced together paths: - 'docs/**' - '**.md' diff --git a/tests/resources/TestCaseBody.robot b/tests/resources/TestCaseBody.robot index 4d3adf74a..5541bc467 100644 --- a/tests/resources/TestCaseBody.robot +++ b/tests/resources/TestCaseBody.robot @@ -16,10 +16,16 @@ Documentation This resource wrap test case body Library ../apitests/python/testutils.py Library ../apitests/python/library/repository.py +Library String *** Variables *** *** Keywords *** +Remove Port + [Arguments] ${address} + ${result}= Replace String ${address} :9443 ${EMPTY} + [Return] ${result} + Body Of Manage project publicity Init Chrome Driver ${d}= Get Current Date result_format=%m%s @@ -578,7 +584,8 @@ Verify Webhook By Tag Retention Finished Event Verify Webhook By Replication Status Changed Event [Arguments] ${project_name} ${webhook_name} ${project_dest_name} ${replication_rule_name} ${user} ${harbor_handle} ${webhook_handle} ${payload_format}=Default &{replication_finished_property}= Create Dictionary - Run Keyword If '${payload_format}' == 'Default' Set To Dictionary ${replication_finished_property} type=REPLICATION operator=${user} registry_type=harbor harbor_hostname=${ip} + ${cleaned_ip}= Remove Port ${ip} + Run Keyword If '${payload_format}' == 'Default' Set To Dictionary ${replication_finished_property} type=REPLICATION operator=${user} registry_type=harbor harbor_hostname=${cleaned_ip} ... ELSE Set To Dictionary ${replication_finished_property} specversion=1.0 type=harbor.replication.status.changed datacontenttype=application/json operator=${user} trigger_type=MANUAL namespace=${project_name} Switch Window ${webhook_handle} Delete All Requests