Merge pull request #31767 from ClickHouse/fail_fasttest_if_some_tests_was_not_successful

Fail fasttest, builds and functional checks if some tests was not successful
This commit is contained in:
alesapin 2021-11-25 17:47:12 +03:00 committed by GitHub
commit f60fdc7a8b
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
4 changed files with 14 additions and 0 deletions

View File

@ -518,6 +518,7 @@ jobs:
- BuilderDebDebug
- BuilderDebSplitted
runs-on: [self-hosted, style-checker]
if: always()
steps:
- name: Download json reports
uses: actions/download-artifact@v2

View File

@ -185,3 +185,7 @@ if __name__ == "__main__":
with open(os.path.join(temp_path, "build_urls_" + build_name + '.json'), 'w') as build_links:
json.dump(result, build_links)
# Fail build job if not successeded
if not success:
sys.exit(1)

View File

@ -5,6 +5,8 @@ import subprocess
import os
import json
import csv
import sys
from github import Github
from pr_info import PRInfo
from s3_helper import S3Helper
@ -142,3 +144,7 @@ if __name__ == "__main__":
prepared_events = prepare_tests_results_for_clickhouse(pr_info, test_results, state, stopwatch.duration_seconds, stopwatch.start_time_str, report_url, NAME)
ch_helper.insert_events_into(db="gh-data", table="checks", events=prepared_events)
# Refuse other checks to run if fast test failed
if state != 'success':
sys.exit(1)

View File

@ -171,3 +171,6 @@ if __name__ == "__main__":
prepared_events = prepare_tests_results_for_clickhouse(pr_info, test_results, state, stopwatch.duration_seconds, stopwatch.start_time_str, report_url, check_name)
ch_helper.insert_events_into(db="gh-data", table="checks", events=prepared_events)
if state != 'success':
sys.exit(1)