Просмотр исходного кода

PR check using ya make

PR check using ya make

Pull Request resolved: https://github.com/ydb-platform/ydb/pull/423
Nikita Kozlovskiy 1 год назад
Родитель
Сommit
e9f6780cc2

+ 26 - 10
.github/actions/build_ya/action.yml

@@ -4,10 +4,10 @@ inputs:
   build_target:
     required: false
     description: "build target"
-  sanitizer:
-    required: false
-    description: "sanitizer type (address, memory, thread, undefined, leak)"
-
+  build_preset:
+    required: true
+    default: "relwithdebinfo"
+    description: "relwithdebinfo, release-asan, release-tsan"
   bazel_remote_uri:
     required: false
     description: "bazel-remote endpoint"
@@ -43,10 +43,6 @@ runs:
           extra_params+=(--target="${{ inputs.build_target }}")
         fi
         
-        if [ ! -z "${{ inputs.sanitizer }}" ] && [ "${{ inputs.sanitizer }}" != "none" ]; then
-          extra_params+=(--sanitize="${{ inputs.sanitizer }}")
-        fi
-        
         if [ ! -z "${{ inputs.bazel_remote_uri }}" ]; then
           extra_params+=(--bazel-remote-store)
           extra_params+=(--bazel-remote-base-uri "${{ inputs.bazel_remote_uri }}")
@@ -57,8 +53,28 @@ runs:
           extra_params+=(--bazel-remote-password "${{ inputs.bazel_remote_password }}")
           extra_params+=(--bazel-remote-put --dist-cache-evict-bins --add-result .o)
         fi
-
-        ./ya make --build relwithdebinfo --force-build-depends -D'BUILD_LANGUAGES=CPP PY3' -T --stat  \
+        
+        case "${{ inputs.build_preset }}" in
+          relwithdebinfo)
+            build_type=relwithdebinfo
+            ;;
+          release-asan)
+            build_type=release
+            extra_params+=(--sanitize="address")
+            extra_params+=(-DSKIP_JUNK -DUSE_EAT_MY_DATA -DDEBUGINFO_LINES_ONLY)
+            ;;
+          release-tsan)
+            build_type=release
+            extra_params+=(--sanitize="thread")
+            extra_params+=(-DSKIP_JUNK -DUSE_EAT_MY_DATA -DDEBUGINFO_LINES_ONLY)
+            ;;
+          *)
+            echo "Invalid preset: ${{ inputs.build_preset }}"
+            exit 1
+            ;;
+        esac
+        
+        ./ya make --build "${build_type}" --force-build-depends -D'BUILD_LANGUAGES=CPP PY3' -T --stat  \
           --log-file "$TMP_DIR/ya_log.txt" --evlog-file "$TMP_DIR/ya_evlog.jsonl" \
           --dump-graph --dump-graph-to-file "$TMP_DIR/ya_graph.json" \
           --cache-size 512G --link-threads "${{ inputs.link_threads }}" \

+ 25 - 4
.github/actions/s3cmd/action.yml

@@ -13,9 +13,12 @@ inputs:
   s3_endpoint:
     required: true
     description: "s3 endpoint"
-  log_suffix:
+  folder_prefix:
     required: true
-    description: "log suffix"
+    description: "folder prefix"
+  build_preset:
+    required: true
+    description: "build preset like relwithdebinfo"
 runs:
   using: "composite"
   steps:
@@ -32,8 +35,26 @@ runs:
         host_base = storage.yandexcloud.net
         host_bucket = %(bucket)s.storage.yandexcloud.net
         EOF
-        echo "S3_BUCKET_PATH=s3://${{ inputs.s3_bucket }}/${{ github.repository }}/${{github.workflow}}/${{ github.run_id }}/${{inputs.log_suffix}}" >> $GITHUB_ENV
-        echo "S3_URL_PREFIX=${{inputs.s3_endpoint}}/${{inputs.s3_bucket}}/${{ github.repository }}/${{github.workflow}}/${{github.run_id}}/${{inputs.log_suffix}}" >> $GITHUB_ENV
+        
+        folder="${{ runner.arch == 'X64' && 'x86-64' || runner.arch == 'ARM64' && 'arm64' || 'unknown' }}"
+        
+        case "${{ inputs.build_preset }}" in
+          relwithdebinfo)
+            ;;
+          release-asan)
+            folder+="-asan"
+            ;;
+          release-tsan)
+            folder+="-tsan"
+            ;;
+          *)
+            echo "Invalid preset: ${{ inputs.build_preset }}"
+            exit 1
+            ;;
+        esac
+
+        echo "S3_BUCKET_PATH=s3://${{ inputs.s3_bucket }}/${{ github.repository }}/${{github.workflow}}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
+        echo "S3_URL_PREFIX=${{ inputs.s3_endpoint }}/${{ inputs.s3_bucket }}/${{ github.repository }}/${{ github.workflow }}/${{ github.run_id }}/${{ inputs.folder_prefix }}${folder}" >> $GITHUB_ENV
       env:
         s3_key_id: ${{ inputs.s3_key_id }}
         s3_secret_access_key: ${{ inputs.s3_key_secret }}

+ 82 - 27
.github/actions/test_ya/action.yml

@@ -4,14 +4,22 @@ inputs:
   build_target:
     required: false
     description: "build target"
-    
-  sanitizer:
-    required: false
-    description: "sanitizer type (address, memory, thread, undefined, leak)"
-    
-  log_suffix:
+
+  build_preset:
     required: true
-    description: "log suffix"
+    default: "relwithdebinfo"
+    description: "relwithdebinfo, release-asan, release-tsan"
+  
+  test_size:
+    required: false
+    default: "small,medium,large"
+    description: "small or small-medium or all"
+  
+  test_type:
+    required: false
+    default: "unittest,py3test,py2test,pytest"
+    description: "run "
+  
   test_threads:
     required: false
     default: "28"
@@ -74,8 +82,24 @@ runs:
       run: |
         RUN_URL="$GITHUB_SERVER_URL/$GITHUB_REPOSITORY/actions/runs/$GITHUB_RUN_ID"
         BRANCH_TAG="$GITHUB_REF_NAME"
-        TESTMO_SOURCE="${{ inputs.log_suffix }}"
-        TESTMO_SOURCE="${TESTMO_SOURCE/_/-}"
+        ARCH="${{ runner.arch == 'X64' && 'x86-64' || runner.arch == 'ARM64' && 'arm64' || 'unknown' }}"
+        
+        
+        case "${{ inputs.build_preset }}" in
+          relwithdebinfo)
+            TESTMO_SOURCE="ya-${ARCH}"
+            ;;
+          release-asan)
+            TESTMO_SOURCE="ya-${ARCH}-asan"
+            ;;
+          release-tsan)
+            TESTMO_SOURCE="ya-${ARCH}-tsan"
+            ;;
+          *)
+            echo "Invalid preset: ${{ inputs.build_preset }}"
+            exit 1
+            ;;
+        esac
         
         case $GITHUB_EVENT_NAME in
         workflow_dispatch)
@@ -99,15 +123,18 @@ runs:
         
         testmo automation:resources:add-link --name build --url "$RUN_URL" --resources testmo.json
         testmo automation:resources:add-field --name git-sha --type string --value "${GITHUB_SHA:0:7}" --resources testmo.json
-        testmo automation:run:create --instance "$TESTMO_URL" --project-id "${{ inputs.testman_project_id }}" --name "$TESTMO_RUN_NAME" \
-          --source "$TESTMO_SOURCE" --resources testmo.json \
-          --tags "$BRANCH_TAG" --tags "$EXTRA_TAG"  | \
-        echo "runid=$(cat)" >> $GITHUB_OUTPUT
+        RUN_ID=$(
+        testmo automation:run:create --instance "$TESTMO_URL" --project-id ${{ inputs.testman_project_id }} \
+          --name "$TESTMO_RUN_NAME" --source "$TESTMO_SOURCE" --resources testmo.json \
+          --tags "$BRANCH_TAG" --tags "$EXTRA_TAG"
+        )
+        echo "runid=${RUN_ID}" >> $GITHUB_OUTPUT
+        echo "TEST_HISTORY_URL=${TESTMO_URL}/automation/runs/view/${RUN_ID}" >> $GITHUB_ENV
 
     - name: Print test history link
       shell: bash
       run: |
-        echo "10 [Test history](${TESTMO_URL}/automation/runs/view/${{steps.th.outputs.runid}})" >> $SUMMARY_LINKS
+        echo "10 [Test history](${TEST_HISTORY_URL})" >> $SUMMARY_LINKS
 
     - name: set environment variables required by some tests
       shell: bash
@@ -118,23 +145,49 @@ runs:
       shell: bash
       run: |
         extra_params=()
+        
+        # FIXME: copy-paste from build_ya
+        case "${{ inputs.build_preset }}" in
+          relwithdebinfo)
+            build_type=relwithdebinfo
+            ;;
+          release-asan)
+            build_type=release
+            extra_params+=(--sanitize="address")
+            extra_params+=(-DSKIP_JUNK -DUSE_EAT_MY_DATA -DDEBUGINFO_LINES_ONLY)
+            ;;
+          release-tsan)
+            build_type=release
+            extra_params+=(--sanitize="thread")
+            extra_params+=(-DSKIP_JUNK -DUSE_EAT_MY_DATA -DDEBUGINFO_LINES_ONLY)
+            ;;
+          *)
+            echo "Invalid preset: ${{ inputs.build_preset }}"
+            exit 1
+            ;;
+        esac
+
 
         if [ ! -z "${{ inputs.build_target }}" ]; then
           extra_params+=(--target="${{ inputs.build_target }}")
         fi
 
-        if [ ! -z "${{ inputs.sanitizer }}" ] && [ "${{ inputs.sanitizer }}" != "none" ]; then
-          extra_params+=(--sanitize="${{ inputs.sanitizer }}")
-        fi
-        
         if [ ! -z "${{ inputs.bazel_remote_uri }}" ]; then
           extra_params+=(--bazel-remote-store)
           extra_params+=(--bazel-remote-base-uri "${{ inputs.bazel_remote_uri }}")
         fi
         
-        ./ya test -A --build relwithdebinfo -D'BUILD_LANGUAGES=CPP PY3' \
+        # FIXME: remove after KIKIMR-19209
+        sed -i 's/^END()/SKIP_TEST("wait for KIKIMR-19209") END()/' ydb/library/yql/tests/sql/sql2yql/ya.make
+        
+        
+        readarray -d ',' -t test_size < <(printf "%s" "${{ inputs.test_size }}")
+        readarray -d ',' -t test_type < <(printf "%s" "${{ inputs.test_type }}")
+        
+        ./ya test -k --build "${build_type}" -D'BUILD_LANGUAGES=CPP PY3' \
+          ${test_size[@]/#/--test-size=} ${test_type[@]/#/--test-type=} \
           --test-threads "${{ inputs.test_threads }}" --link-threads "${{ inputs.link_threads }}" \
-          --cache-size 512G --regular-tests --do-not-output-stderrs -T \
+          --cache-size 512G --do-not-output-stderrs -T \
           --stat --log-file "$LOG_DIR/ya_log.txt" --evlog-file "$LOG_DIR/ya_evlog.jsonl" \
           --dump-graph --dump-graph-to-file "$LOG_DIR/ya_graph.json" \
           --junit "$JUNIT_REPORT_XML" --output "$OUT_DIR" "${extra_params[@]}" || (
@@ -158,24 +211,26 @@ runs:
           "$JUNIT_REPORT_XML"
 
     - name: write tests summary
-      if: always()
       shell: bash
       env:
         GITHUB_TOKEN: ${{ github.token }}
       run: |
-        
+        mkdir $ARTIFACTS_DIR/summary/
+
         cat $SUMMARY_LINKS | python3 -c 'import sys; print(" | ".join([v for _, v in sorted([l.strip().split(" ", 1) for l in sys.stdin], key=lambda a: (int(a[0]), a))]))' >> $GITHUB_STEP_SUMMARY
         
-        mkdir $ARTIFACTS_DIR/summary/
+        platform_name=$(uname | tr '[:upper:]' '[:lower:]')-$(arch)
         
         .github/scripts/tests/generate-summary.py \
-        --summary-out-path $ARTIFACTS_DIR/summary/ \
-        --summary-url-prefix $S3_URL_PREFIX/summary/ \
-        "Tests" ya-test.html "$JUNIT_REPORT_XML"
+          --summary-out-path $ARTIFACTS_DIR/summary/ \
+          --summary-url-prefix $S3_URL_PREFIX/summary/ \
+          --test-history-url $TEST_HISTORY_URL \
+          --build-preset "${platform_name}-${{ inputs.build_preset }}" \
+          "Tests" ya-test.html "$JUNIT_REPORT_XML"
 
 
     - name: Unit test history upload results
-      if: always() && inputs.testman_token
+      if: inputs.testman_token
       shell: bash
       run: |
         testmo automation:run:submit-thread \

+ 45 - 18
.github/scripts/tests/generate-summary.py

@@ -2,13 +2,14 @@
 import argparse
 import dataclasses
 import os
+import re
 import json
 import sys
 from github import Github, Auth as GithubAuth
 from github.PullRequest import PullRequest
 from enum import Enum
 from operator import attrgetter
-from typing import List, Optional
+from typing import List, Optional, Dict
 from jinja2 import Environment, FileSystemLoader, StrictUndefined
 from junit_utils import get_property_value, iter_xml_files
 
@@ -29,7 +30,7 @@ class TestResult:
     classname: str
     name: str
     status: TestStatus
-    log_url: Optional[str]
+    log_urls: Dict[str, str]
     elapsed: float
 
     @property
@@ -73,7 +74,14 @@ class TestResult:
         else:
             status = TestStatus.PASS
 
-        log_url = get_property_value(testcase, "url:Log")
+        log_urls = {
+            'Log': get_property_value(testcase, "url:Log"),
+            'log': get_property_value(testcase, "url:log"),
+            'stdout': get_property_value(testcase, "url:stdout"),
+            'stderr': get_property_value(testcase, "url:stderr"),
+        }
+        log_urls = {k: v for k, v in log_urls.items() if v}
+
         elapsed = testcase.get("time")
 
         try:
@@ -82,7 +90,7 @@ class TestResult:
             elapsed = 0
             print(f"Unable to cast elapsed time for {classname}::{name}  value={elapsed!r}")
 
-        return cls(classname, name, status, log_url, elapsed)
+        return cls(classname, name, status, log_urls, elapsed)
 
 
 class TestSummaryLine:
@@ -215,7 +223,7 @@ def render_testlist_html(rows, fn):
 
     for t in rows:
         status_test.setdefault(t.status, []).append(t)
-        if t.log_url:
+        if any(t.log_urls.values()):
             has_any_log.add(t.status)
 
     for status in status_test.keys():
@@ -268,35 +276,52 @@ def gen_summary(summary_url_prefix, summary_out_folder, paths):
     return summary
 
 
-def update_pr_comment(pr: PullRequest, summary: TestSummary, test_history_url: str):
-    header = f"<!-- status {pr.number} -->"
+def get_comment_text(pr: PullRequest, summary: TestSummary, build_preset: str, test_history_url: str):
 
     if summary.is_failed:
-        result = ":red_circle: Some tests failed"
+        result = f":red_circle: **{build_preset}**: some tests FAILED"
     else:
-        result = ":green_circle: All tests passed"
+        result = f":green_circle: **{build_preset}**: all tests PASSED"
 
-    body = [header, f"{result} for commit {pr.head.sha}."]
+    body = [f"{result} for commit {pr.head.sha}."]
 
     if test_history_url:
         body.append("")
         body.append(f"[Test history]({test_history_url})")
 
     body.extend(summary.render())
-    body = "\n".join(body)
 
-    comment = None
+    return body
+
+
+def update_pr_comment(run_number: int, pr: PullRequest, summary: TestSummary, build_preset: str, test_history_url: str):
+    header = f"<!-- status pr={pr.number}, run={{}} -->"
+    header_re = re.compile(header.format(r"(\d+)"))
+
+    comment = body = None
 
     for c in pr.get_issue_comments():
-        if c.body.startswith(header):
+        if matches := header_re.match(c.body):
             comment = c
-            break
+            if int(matches[1]) == run_number:
+                body = [c.body, "", "---", ""]
+
+    if body is None:
+        body = [
+            header.format(run_number),
+            "> [!NOTE]",
+            "> This is an automated comment that will be appended during run.",
+            "",
+        ]
+
+    body.extend(get_comment_text(pr, summary, build_preset, test_history_url))
+
+    body = "\n".join(body)
 
     if comment is None:
         pr.create_issue_comment(body)
-        return
-
-    comment.edit(body)
+    else:
+        comment.edit(body)
 
 
 def main():
@@ -304,6 +329,7 @@ def main():
     parser.add_argument("--summary-out-path", required=True)
     parser.add_argument("--summary-url-prefix", required=True)
     parser.add_argument('--test-history-url', required=False)
+    parser.add_argument('--build-preset', default="default-linux-x86-64-relwithdebinfo", required=False)
     parser.add_argument("args", nargs="+", metavar="TITLE html_out path")
     args = parser.parse_args()
 
@@ -323,8 +349,9 @@ def main():
         with open(os.environ["GITHUB_EVENT_PATH"]) as fp:
             event = json.load(fp)
 
+        run_number = int(os.environ.get("GITHUB_RUN_NUMBER"))
         pr = gh.create_from_raw_data(PullRequest, event["pull_request"])
-        update_pr_comment(pr, summary, args.test_history_url)
+        update_pr_comment(run_number, pr, summary, args.build_preset, args.test_history_url)
 
 
 if __name__ == "__main__":

+ 5 - 2
.github/scripts/tests/templates/summary.html

@@ -59,8 +59,11 @@
         </td>
         {% if status in has_any_log %}
         <td>
-            {% if t.log_url %}
-                <a href="{{ t.log_url }}">LOG</a>
+            {% if t.log_urls %}
+                {% for log_name, log_url in t.log_urls.items() %}
+                <a href="{{ log_url }}">{{ log_name.upper() }}</a>{% if not loop.last %} | {% endif %}
+
+                {% endfor %}
             {% else %}
                 &nbsp;
             {% endif %}

+ 33 - 12
.github/workflows/build_and_test_ya.yml

@@ -7,10 +7,8 @@ on:
         type: string
         default: "ydb/"
         description: "limit build and test to specific target"
-      sanitizer:
+      build_preset:
         type: string
-        default: "none"
-        description: "sanitizer type"
       runner_kind:
         type: string
         required: true
@@ -27,19 +25,37 @@ on:
         type: boolean
         default: true
         description: "run tests"
-      log_suffix:
+      test_threads:
         type: string
-        required: true
-        description: "suffix for current build. uses as testmo source and s3 subfolder"
-
+        default: 28
+        description: "Test threads count"
+      link_threads:
+        type: string
+        default: 8
+        description: "link threads count"
+      test_size:
+        type: string
+        default: "small,medium,large"
+      test_type:
+        type: string
+        default: "unittest,py3test,py2test,pytest"
+      folder_prefix:
+        type: string
+        default: "ya-"
 
 jobs:
   main:
-    name: Build and test
+    name: Build and test ${{ inputs.build_preset }}
     runs-on: [ self-hosted, "${{ inputs.runner_kind }}", "${{ inputs.runner_label }}" ]
     steps:
+    - name: Checkout PR
+      uses: actions/checkout@v3
+      if: github.event.pull_request.head.sha != ''
+      with:
+        ref: ${{ github.event.pull_request.head.sha }}
     - name: Checkout
       uses: actions/checkout@v3
+      if: github.event.pull_request.head.sha == ''
 
     - name: Prepare s3cmd
       uses: ./.github/actions/s3cmd
@@ -48,26 +64,31 @@ jobs:
         s3_endpoint: ${{ vars.AWS_ENDPOINT }}
         s3_key_id: ${{ secrets.AWS_KEY_ID }}
         s3_key_secret: ${{ secrets.AWS_KEY_VALUE }}
-        log_suffix: ${{ inputs.log_suffix }}
+        folder_prefix: ya-
+        build_preset: ${{ inputs.build_preset }}
 
     - name: Build
       uses: ./.github/actions/build_ya
       if: inputs.run_build
       with:
         build_target: ${{ inputs.build_target }}
-        sanitizer: ${{ inputs.sanitizer }}
+        build_preset: ${{ inputs.build_preset }}
         bazel_remote_uri: ${{ vars.REMOTE_CACHE_URL_YA || '' }}
         bazel_remote_username: ${{ secrets.REMOTE_CACHE_USERNAME }}
         bazel_remote_password: ${{ secrets.REMOTE_CACHE_PASSWORD }}
+        link_threads: ${{ inputs.link_threads }}
 
     - name: Run tests
       uses: ./.github/actions/test_ya
       if: inputs.run_tests
       with:
         build_target: ${{ inputs.build_target }}
-        sanitizer: ${{ inputs.sanitizer }}
-        log_suffix: ${{ inputs.log_suffix }}
+        build_preset: ${{ inputs.build_preset }}
+        test_size: ${{ inputs.test_size }}
+        test_type: ${{ inputs.test_type }}
         testman_token: ${{ secrets.TESTMO_TOKEN }}
         testman_url: ${{ vars.TESTMO_URL }}
         testman_project_id: ${{ vars.TESTMO_PROJECT_ID }}
         bazel_remote_uri: ${{ vars.REMOTE_CACHE_URL_YA || '' }}
+        link_threads: ${{ inputs.link_threads }}
+        test_threads: ${{ inputs.test_threads }}

+ 50 - 13
.github/workflows/build_and_test_ya_ondemand.yml

@@ -11,17 +11,38 @@ on:
         type: string
         default: "ydb/"
         description: "limit build and test to specific target"
-      sanitizer:
+      build_preset:
         type: choice
-        default: "none"
-        description: "sanitizer type"
+        default: "relwithdebinfo"
+        description: "Build preset"
         options:
-          - none
-          - address
-          - memory
-          - thread
-          - undefined
-          - leak
+          - relwithdebinfo
+          - release-asan
+          - release-tsan
+      test_size:
+        type: choice
+        default: "small,medium,large"
+        description: "test size to run"
+        options:
+          - small
+          - small,medium
+          - small,medium,large
+      test_type:
+        type: choice
+        default: "unittest,py3test,py2test,pytest"
+        description: "type of tests to run"
+        options:
+          - unittest
+          - py3test,py2test,pytest
+          - unittest,py3test,py2test,pytest
+      test_threads:
+        type: string
+        default: "28"
+        description: "Test threads count"
+      link_threads:
+        type: string
+        default: "8"
+        description: "link threads count"
       run_build:
         type: boolean
         default: true
@@ -38,15 +59,28 @@ on:
       build_target:
         type: string
         default: "ydb/"
-      sanitizer:
+      build_preset:
+        type: string
+      test_size:
+        type: string
+        default: "small,medium,large"
+      test_type:
         type: string
-        default: "none"
+        default: "unittest,py3test,py2test,pytest"
       run_build:
         type: boolean
         default: true
       run_tests:
         type: boolean
         default: true
+      test_threads:
+        type: string
+        default: 28
+        description: "Test threads count"
+      link_threads:
+        type: string
+        default: 8
+        description: "link threads count"
 
 jobs:
   provide-runner:
@@ -99,10 +133,13 @@ jobs:
       runner_kind: self-hosted
       runner_label: ${{ needs.provide-runner.outputs.label }}
       build_target: ${{ inputs.build_target }}
-      sanitizer: ${{ inputs.sanitizer }}
+      build_preset: ${{ inputs.build_preset }}
       run_build: ${{ inputs.run_build }}
       run_tests: ${{ inputs.run_tests }}
-      log_suffix: ya-x86-64${{ inputs.sanitizer != 'none' && format('-{0}', inputs.sanitizer) || '' }}
+      test_size: ${{ inputs.test_size }}
+      test_type: ${{ inputs.test_type }}
+      link_threads: ${{ inputs.link_threads }}
+      test_threads: ${{ inputs.test_threads }}
     secrets: inherit
 
   release-runner:

+ 53 - 24
.github/workflows/build_and_test_ya_provisioned.yml

@@ -7,21 +7,30 @@ on:
         type: string
         default: "ydb/"
         description: "limit build and test to specific target"
-      sanitizer:
+      build_preset:
         type: choice
-        default: "none"
-        description: "sanitizer type"
+        default: "relwithdebinfo"
+        description: "Build preset"
         options:
-          - none
-          - address
-          - memory
-          - thread
-          - undefined
-          - leak
-      runner_label:
-        type: string
-        default: "ya-make"
-        description: "runner label"
+          - relwithdebinfo
+          - release-asan
+          - release-tsan
+      test_size:
+        type: choice
+        default: "small,medium,large"
+        description: "test size to run"
+        options:
+          - small
+          - small,medium
+          - small,medium,large
+      test_type:
+        type: choice
+        default: "unittest,py3test,py2test,pytest"
+        description: "type of tests to run"
+        options:
+          - unittest
+          - py3test,py2test,pytest
+          - unittest,py3test,py2test,pytest
       run_build:
         type: boolean
         default: true
@@ -30,30 +39,47 @@ on:
         type: boolean
         default: true
         description: "run tests"
-      testmo_source:
+      test_threads:
         type: string
-        default: "ya-x86-64"
-        description: "testmo source"
+        default: "28"
+        description: "Test threads count"
+      link_threads:
+        type: string
+        default: "8"
+        description: "link threads count"
+      runner_label:
+        type: string
+        default: "ya-make"
+        description: "runner label"
   workflow_call:
     inputs:
       build_target:
         type: string
-        default: "ydb/"
-      sanitizer:
+      build_preset:
+        type: string
+      test_size:
         type: string
-        default: "none"
+        default: "small,medium,large"
+      test_type:
+        type: string
+        default: "unittest,py3test,py2test,pytest"
       run_build:
         type: boolean
         default: true
       run_tests:
         type: boolean
         default: true
+      test_threads:
+        type: string
+        default: "28"
+        description: "Test threads count"
+      link_threads:
+        type: string
+        default: "8"
+        description: "link threads count"
       runner_label:
         type: string
         default: "ya-make"
-      testmo_source:
-        type: string
-        default: "ya-x86-64"
 
 jobs:
   main:
@@ -62,8 +88,11 @@ jobs:
       runner_kind: provisioned
       runner_label: ${{ inputs.runner_label }}
       build_target: ${{ inputs.build_target }}
-      sanitizer: ${{ inputs.sanitizer }}
+      build_preset: ${{ inputs.build_preset }}
       run_build: ${{ inputs.run_build }}
       run_tests: ${{ inputs.run_tests }}
-      log_suffix: ${{ inputs.testmo_source }}
+      test_size: ${{ inputs.test_size }}
+      test_type: ${{ inputs.test_type }}
+      link_threads: ${{ inputs.link_threads }}
+      test_threads: ${{ inputs.test_threads }}
     secrets: inherit

+ 11 - 3
.github/workflows/pr_check.yml

@@ -98,8 +98,16 @@ jobs:
     needs:
       - check-running-allowed
     if: needs.check-running-allowed.outputs.result == 'true'
-    uses: ./.github/workflows/build_and_test_ondemand.yml
+    strategy:
+      fail-fast: false
+      matrix:
+        build_preset: ["relwithdebinfo", "release-asan"]
+    name: Build and test ${{ matrix.build_preset }}
+    uses: ./.github/workflows/build_and_test_ya_ondemand.yml
     with:
-      run_functional_tests: false
-      test_label_regexp: '(SMALL|MEDIUM)'
+      build_preset: ${{ matrix.build_preset }}
+      build_target: "ydb/"
+      test_size: "small,medium"
+      test_type: "unittest,py3test,py2test,pytest"
+      test_threads: 52
     secrets: inherit