build_and_test_ya.yml 3.0 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192
  1. name: Ya-Build-and-Test
  2. on:
  3. workflow_call:
  4. inputs:
  5. build_target:
  6. type: string
  7. default: "ydb/"
  8. description: "limit build and test to specific target"
  9. build_preset:
  10. type: string
  11. runner_label:
  12. type: string
  13. default: "linux"
  14. description: "runner label"
  15. runner_additional_label:
  16. type: string
  17. default: "linux"
  18. description: "additional runner label, can be empty"
  19. run_build:
  20. type: boolean
  21. default: true
  22. description: "run build"
  23. run_tests:
  24. type: boolean
  25. default: true
  26. description: "run tests"
  27. test_threads:
  28. type: string
  29. default: 56
  30. description: "Test threads count"
  31. link_threads:
  32. type: string
  33. default: 12
  34. description: "link threads count"
  35. test_size:
  36. type: string
  37. default: "small,medium,large"
  38. test_retry_count:
  39. type: string
  40. default: ""
  41. description: "how many times to retry failed tests"
  42. test_type:
  43. type: string
  44. default: ""
  45. folder_prefix:
  46. type: string
  47. default: "ya-"
  48. cache_tests:
  49. type: boolean
  50. default: false
  51. description: "Use cache for tests"
  52. put_build_results_to_cache:
  53. type: boolean
  54. default: true
  55. commit_sha:
  56. type: string
  57. default: ""
  58. defaults:
  59. run:
  60. shell: bash
  61. jobs:
  62. main:
  63. name: Build and test ${{ inputs.build_preset }}
  64. runs-on: [ self-hosted, "${{ inputs.runner_label }}", "${{ inputs.runner_additional_label || inputs.runner_label }}"]
  65. steps:
  66. - name: Checkout
  67. uses: actions/checkout@v4
  68. with:
  69. ref: ${{ inputs.commit_sha }}
  70. - name: Setup ydb access
  71. uses: ./.github/actions/setup_ci_ydb_service_account_key_file_credentials
  72. with:
  73. ci_ydb_service_account_key_file_credentials: ${{ secrets.CI_YDB_SERVICE_ACCOUNT_KEY_FILE_CREDENTIALS }}
  74. - name: Build and test
  75. uses: ./.github/actions/build_and_test_ya
  76. with:
  77. build_preset: ${{ inputs.build_preset }}
  78. build_target: ${{ inputs.build_target }}
  79. increment: false
  80. run_tests: ${{ inputs.run_tests }}
  81. test_size: ${{ inputs.test_size }}
  82. test_type: ${{ inputs.test_type }}
  83. test_retry_count: ${{ inputs.test_retry_count }}
  84. test_threads: ${{ inputs.test_threads }}
  85. put_build_results_to_cache: ${{ inputs.put_build_results_to_cache }}
  86. secs: ${{ format('{{"TESTMO_TOKEN2":"{0}","AWS_KEY_ID":"{1}","AWS_KEY_VALUE":"{2}","REMOTE_CACHE_USERNAME":"{3}","REMOTE_CACHE_PASSWORD":"{4}"}}',
  87. secrets.TESTMO_TOKEN2, secrets.AWS_KEY_ID, secrets.AWS_KEY_VALUE, secrets.REMOTE_CACHE_USERNAME, secrets.REMOTE_CACHE_PASSWORD ) }}
  88. vars: ${{ format('{{"AWS_BUCKET":"{0}","AWS_ENDPOINT":"{1}","REMOTE_CACHE_URL":"{2}","TESTMO_URL":"{3}","TESTMO_PROJECT_ID":"{4}"}}',
  89. vars.AWS_BUCKET, vars.AWS_ENDPOINT, vars.REMOTE_CACHE_URL_YA, vars.TESTMO_URL, vars.TESTMO_PROJECT_ID ) }}