Skip to content
代码片段 群组 项目
提交 7a771a84 编辑于 作者: Rémy Coutable's avatar Rémy Coutable
浏览文件

Merge branch 'am-enable-slow-tests-detection-for-mr' into 'master'

ci: Enable Merge Request notes for slow RSpec tests

See merge request https://gitlab.com/gitlab-org/gitlab/-/merge_requests/128880



Merged-by: default avatarRémy Coutable <remy@rymai.me>
Approved-by: default avatarRémy Coutable <remy@rymai.me>
Reviewed-by: default avatarRémy Coutable <remy@rymai.me>
Co-authored-by: default avatarAlina Mihaila <amihaila@gitlab.com>
No related branches found
No related tags found
无相关合并请求
...@@ -37,6 +37,9 @@ default: ...@@ -37,6 +37,9 @@ default:
CREATE_RAILS_TEST_FAILURE_ISSUES: "true" CREATE_RAILS_TEST_FAILURE_ISSUES: "true"
CREATE_RAILS_SLOW_TEST_ISSUES: "true" CREATE_RAILS_SLOW_TEST_ISSUES: "true"
.default-merge-request-slow-tests-variables: &default-merge-request-slow-tests-variables
ADD_SLOW_TEST_NOTE_TO_MERGE_REQUEST: "true"
.if-merge-request-security-canonical-sync: &if-merge-request-security-canonical-sync .if-merge-request-security-canonical-sync: &if-merge-request-security-canonical-sync
if: '$CI_MERGE_REQUEST_SOURCE_PROJECT_PATH == "gitlab-org/security/gitlab" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH' if: '$CI_MERGE_REQUEST_SOURCE_PROJECT_PATH == "gitlab-org/security/gitlab" && $CI_MERGE_REQUEST_SOURCE_BRANCH_NAME == $CI_DEFAULT_BRANCH && $CI_MERGE_REQUEST_TARGET_BRANCH_NAME == $CI_DEFAULT_BRANCH'
...@@ -81,6 +84,7 @@ workflow: ...@@ -81,6 +84,7 @@ workflow:
- if: '$CI_MERGE_REQUEST_IID' - if: '$CI_MERGE_REQUEST_IID'
variables: variables:
<<: *default-ruby-variables <<: *default-ruby-variables
<<: *default-merge-request-slow-tests-variables
PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_MERGE_REQUEST_EVENT_TYPE MR pipeline' PIPELINE_NAME: 'Ruby $RUBY_VERSION $CI_MERGE_REQUEST_EVENT_TYPE MR pipeline'
NO_SOURCEMAPS: 'true' NO_SOURCEMAPS: 'true'
# For the scheduled pipelines, we set specific variables. # For the scheduled pipelines, we set specific variables.
......
...@@ -88,6 +88,9 @@ include: ...@@ -88,6 +88,9 @@ include:
if [ "$CREATE_RAILS_SLOW_TEST_ISSUES" == "true" ]; then if [ "$CREATE_RAILS_SLOW_TEST_ISSUES" == "true" ]; then
bundle exec slow-test-issues --input-files "rspec/rspec-*.json" --project "gitlab-org/gitlab" --token "${TEST_FAILURES_PROJECT_TOKEN}"; bundle exec slow-test-issues --input-files "rspec/rspec-*.json" --project "gitlab-org/gitlab" --token "${TEST_FAILURES_PROJECT_TOKEN}";
fi fi
if [ "$ADD_SLOW_TEST_NOTE_TO_MERGE_REQUEST" == "true" ]; then
bundle exec slow-test-merge-request-report-note --input-files "rspec/rspec-*.json" --project "gitlab-org/gitlab" --merge_request_iid "$CI_MERGE_REQUEST_IID" --token "${TEST_FAILURES_PROJECT_TOKEN}";
fi
- echo -e "\e[0Ksection_end:`date +%s`:report_results_section\r\e[0K" - echo -e "\e[0Ksection_end:`date +%s`:report_results_section\r\e[0K"
allow_failure: allow_failure:
......
0% 加载中 .
You are about to add 0 people to the discussion. Proceed with caution.
先完成此消息的编辑!
想要评论请 注册