build_and_test_ya.yml 2.1 KB

12345678910111213141516171819202122232425262728293031323334353637383940414243444546474849505152535455565758596061626364656667686970717273
  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. sanitizer:
  10. type: string
  11. default: "none"
  12. description: "sanitizer type"
  13. runner_kind:
  14. type: string
  15. required: true
  16. description: "self-hosted or provisioned"
  17. runner_label:
  18. type: string
  19. default: "linux"
  20. description: "runner label"
  21. run_build:
  22. type: boolean
  23. default: true
  24. description: "run build"
  25. run_tests:
  26. type: boolean
  27. default: true
  28. description: "run tests"
  29. log_suffix:
  30. type: string
  31. required: true
  32. description: "suffix for current build. uses as testmo source and s3 subfolder"
  33. jobs:
  34. main:
  35. name: Build and test
  36. runs-on: [ self-hosted, "${{ inputs.runner_kind }}", "${{ inputs.runner_label }}" ]
  37. steps:
  38. - name: Checkout
  39. uses: actions/checkout@v3
  40. - name: Prepare s3cmd
  41. uses: ./.github/actions/s3cmd
  42. with:
  43. s3_bucket: ${{ vars.AWS_BUCKET }}
  44. s3_endpoint: ${{ vars.AWS_ENDPOINT }}
  45. s3_key_id: ${{ secrets.AWS_KEY_ID }}
  46. s3_key_secret: ${{ secrets.AWS_KEY_VALUE }}
  47. log_suffix: ${{ inputs.log_suffix }}
  48. - name: Build
  49. uses: ./.github/actions/build_ya
  50. if: inputs.run_build
  51. with:
  52. build_target: ${{ inputs.build_target }}
  53. sanitizer: ${{ inputs.sanitizer }}
  54. bazel_remote_uri: ${{ vars.REMOTE_CACHE_URL_YA || '' }}
  55. bazel_remote_username: ${{ secrets.REMOTE_CACHE_USERNAME }}
  56. bazel_remote_password: ${{ secrets.REMOTE_CACHE_PASSWORD }}
  57. - name: Run tests
  58. uses: ./.github/actions/test_ya
  59. if: inputs.run_tests
  60. with:
  61. build_target: ${{ inputs.build_target }}
  62. sanitizer: ${{ inputs.sanitizer }}
  63. log_suffix: ${{ inputs.log_suffix }}
  64. testman_token: ${{ secrets.TESTMO_TOKEN }}
  65. testman_url: ${{ vars.TESTMO_URL }}
  66. testman_project_id: ${{ vars.TESTMO_PROJECT_ID }}
  67. bazel_remote_uri: ${{ vars.REMOTE_CACHE_URL_YA || '' }}