diff --git a/.github/workflows/reusable_install_test.yml b/.github/workflows/reusable_install_test.yml new file mode 100644 index 00000000000..5d1a0509f64 --- /dev/null +++ b/.github/workflows/reusable_install_test.yml @@ -0,0 +1,64 @@ +### For the pure soul wishes to move it to another place +# https://github.com/orgs/community/discussions/9050 + +name: Test installation +'on': + workflow_call: + inputs: + test_name: + description: the value of test type from tests/ci/ci_config.py + required: true + type: string + checkout_depth: + description: the value of the git shallow checkout + required: false + type: number + default: 1 + runner_type: + description: the label of runner to use + default: style-checker + type: string + additional_envs: + description: additional ENV variables to setup the job + type: string + +jobs: + InstallCheck: + name: ${{inputs.test_name}} + runs-on: [self-hosted, '${{inputs.runner_type}}'] + steps: + - name: Check out repository code + uses: ClickHouse/checkout@v1 + with: + clear-repository: true + submodules: true + fetch-depth: ${{inputs.checkout_depth}} + filter: tree:0 + - name: Set build envs + run: | + cat >> "$GITHUB_ENV" << 'EOF' + REPORTS_PATH=${{runner.temp}}/reports_dir + GITHUB_JOB_OVERRIDDEN=${{inputs.test_name}} + CHECK_NAME=${{inputs.test_name}} + ${{inputs.additional_envs}} + EOF + - name: Common setup + uses: ./.github/actions/common_setup + with: + job_type: test_install + - name: Download json reports + uses: actions/download-artifact@v3 + with: + path: ${{ env.REPORTS_PATH }} + - name: Build + run: | + cd "$REPO_COPY/tests/ci" + python3 install_check.py "$CHECK_NAME" + - name: Upload build URLs to artifacts + if: ${{ success() || failure() }} + uses: actions/upload-artifact@v3 + with: + name: ${{ env.BUILD_URLS }} + path: ${{ env.TEMP_PATH }}/${{ env.BUILD_URLS }}.json + - name: Clean + uses: ./.github/actions/clean