mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-11-17 21:24:28 +00:00
243 lines
8.1 KiB
YAML
243 lines
8.1 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
|
|
env:
|
|
TEMP_PATH: ${{ runner.temp }}/style_check
|
|
run: |
|
|
cd $GITHUB_WORKSPACE/tests/ci
|
|
python3 style_check.py
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
DocsCheck:
|
|
needs: DockerHubPush
|
|
runs-on: [self-hosted, func-tester]
|
|
steps:
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/docs_check
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Docs Check
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/docs_check
|
|
REPO_COPY: ${{runner.temp}}/docs_check/ClickHouse
|
|
run: |
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci
|
|
python3 docs_check.py
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
BuilderDebDebug:
|
|
needs: DockerHubPush
|
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'pr-documentation') && !contains(github.event.pull_request.labels.*.name, 'pr-doc-fix') }}
|
|
runs-on: [self-hosted, builder]
|
|
steps:
|
|
- name: Download changed images
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
name: changed_images
|
|
path: ${{ runner.temp }}/images_path
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
with:
|
|
submodules: 'recursive'
|
|
fetch-depth: 0 # otherwise we will have no info about contributors
|
|
- name: Build
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/build_check
|
|
IMAGES_PATH: ${{runner.temp}}/images_path
|
|
REPO_COPY: ${{runner.temp}}/build_check/ClickHouse
|
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
|
BUILD_NUMBER: 7
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci && python3 build_check.py "$CHECK_NAME" $BUILD_NUMBER
|
|
- 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
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
BuilderReport:
|
|
needs: [BuilderDebDebug]
|
|
runs-on: [self-hosted, style-checker]
|
|
steps:
|
|
- name: Download json reports
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: ${{runner.temp}}/reports_dir
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Report Builder
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/report_check
|
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
|
CHECK_NAME: 'ClickHouse build check (actions)'
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cd $GITHUB_WORKSPACE/tests/ci
|
|
python3 build_report_check.py "$CHECK_NAME"
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
FunctionalStatelessTestDebug:
|
|
needs: [BuilderDebDebug]
|
|
runs-on: [self-hosted, func-tester]
|
|
steps:
|
|
- name: Download json reports
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: ${{runner.temp}}/reports_dir
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Functional test
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/stateless_debug
|
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
|
CHECK_NAME: 'Stateless tests (debug, actions)'
|
|
REPO_COPY: ${{runner.temp}}/stateless_debug/ClickHouse
|
|
REQUIRED_BUILD_NUMBER: 7
|
|
KILL_TIMEOUT: 10800
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci
|
|
python3 functional_test_check.py "$CHECK_NAME" $REQUIRED_BUILD_NUMBER $KILL_TIMEOUT
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
FunctionalStatefulTestDebug:
|
|
needs: [BuilderDebDebug]
|
|
runs-on: [self-hosted, func-tester]
|
|
steps:
|
|
- name: Download json reports
|
|
uses: actions/download-artifact@v2
|
|
with:
|
|
path: ${{runner.temp}}/reports_dir
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Functional test
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/stateful_debug
|
|
REPORTS_PATH: ${{runner.temp}}/reports_dir
|
|
CHECK_NAME: 'Stateful tests (debug, actions)'
|
|
REPO_COPY: ${{runner.temp}}/stateful_debug/ClickHouse
|
|
REQUIRED_BUILD_NUMBER: 7
|
|
KILL_TIMEOUT: 3600
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci
|
|
python3 functional_test_check.py "$CHECK_NAME" $REQUIRED_BUILD_NUMBER $KILL_TIMEOUT
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
FastTest:
|
|
needs: DockerHubPush
|
|
if: ${{ !contains(github.event.pull_request.labels.*.name, 'pr-documentation') && !contains(github.event.pull_request.labels.*.name, 'pr-doc-fix') }}
|
|
runs-on: [self-hosted, builder]
|
|
steps:
|
|
- name: Check out repository code
|
|
uses: actions/checkout@v2
|
|
- name: Fast Test
|
|
env:
|
|
TEMP_PATH: ${{runner.temp}}/fasttest
|
|
REPO_COPY: ${{runner.temp}}/fasttest/ClickHouse
|
|
CACHES_PATH: ${{runner.temp}}/../ccaches
|
|
run: |
|
|
sudo rm -fr $TEMP_PATH
|
|
mkdir -p $TEMP_PATH
|
|
cp -r $GITHUB_WORKSPACE $TEMP_PATH
|
|
cd $REPO_COPY/tests/ci && python3 fast_test_check.py
|
|
- name: Cleanup
|
|
if: always()
|
|
run: |
|
|
docker kill $(docker ps -q) ||:
|
|
docker rm -f $(docker ps -a -q) ||:
|
|
sudo rm -fr $TEMP_PATH
|
|
FinishCheck:
|
|
needs: [StyleCheck, DockerHubPush, CheckLabels, BuilderReport, FastTest, FunctionalStatelessTestDebug, FunctionalStatefulTestDebug]
|
|
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
|