mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
82 lines
2.6 KiB
YAML
82 lines
2.6 KiB
YAML
name: CIGithubActions
|
|
on: # yamllint disable-line rule:truthy
|
|
pull_request:
|
|
types:
|
|
- labeled
|
|
- unlabeled
|
|
- synchronize
|
|
- reopened
|
|
- opened
|
|
branches:
|
|
- master
|
|
jobs:
|
|
CheckLabels:
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Labels check
|
|
run: cd $GITHUB_WORKSPACE/tests/ci && python3 run_check.py
|
|
DockerHubPush:
|
|
needs: CheckLabels
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Images check
|
|
run: cd $GITHUB_WORKSPACE/tests/ci && python3 docker_images_check.py
|
|
- name: Upload images files to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/docker_images_check/changed_images.json
|
|
StyleCheck:
|
|
needs: DockerHubPush
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/style_check
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Style Check
|
|
run: cd $GITHUB_WORKSPACE/tests/ci && python3 style_check.py
|
|
Builder:
|
|
needs: DockerHubPush
|
|
runs-on: [self-hosted, builder]
|
|
strategy:
|
|
fail-fast: false
|
|
matrix:
|
|
build_number: [7]
|
|
steps:
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/build_check
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
- name: Build
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/build_check
|
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
|
run: mkdir -p $TEMP_PATH && cp -r $GITHUB_WORKSPACE $TEMP_PATH && cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" ${{ matrix.build_number }} '21.10.1.1'
|
|
- name: Upload build URLs to artifacts
|
|
uses: actions/upload-artifact@v2
|
|
with:
|
|
name: ${{ env.BUILD_NAME }}
|
|
path: ${{ runner.temp }}/build_check/${{ env.BUILD_NAME }}.json
|
|
FinishCheck:
|
|
needs: [StyleCheck, DockerHubPush, CheckLabels]
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Finish label
|
|
run: cd $GITHUB_WORKSPACE/tests/ci && python3 finish_check.py
|