1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162636465666768697071727374757677787980818283848586878889909192939495969798 |
- name: Ya-Build-and-Test
- on:
- workflow_call:
- inputs:
- build_target:
- type: string
- default: "ydb/"
- description: "limit build and test to specific target"
- build_preset:
- type: string
- runner_kind:
- type: string
- required: true
- description: "self-hosted or provisioned"
- runner_label:
- type: string
- default: "linux"
- description: "runner label"
- run_build:
- type: boolean
- default: true
- description: "run build"
- run_tests:
- type: boolean
- default: true
- description: "run tests"
- test_threads:
- type: string
- 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-"
- cache_tests:
- type: boolean
- default: false
- description: "Use cache for tests"
- jobs:
- main:
- 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
- with:
- s3_bucket: ${{ vars.AWS_BUCKET }}
- s3_endpoint: ${{ vars.AWS_ENDPOINT }}
- s3_key_id: ${{ secrets.AWS_KEY_ID }}
- s3_key_secret: ${{ secrets.AWS_KEY_VALUE }}
- 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 }}
- 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 }}
- 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 }}
|