mirror of
https://github.com/ClickHouse/ClickHouse.git
synced 2024-09-19 16:20:50 +00:00
Rewrite fast tests to reusable workflow
This commit is contained in:
parent
6f8baf3def
commit
b6a71ae6f4
36
.github/workflows/pull_request.yml
vendored
36
.github/workflows/pull_request.yml
vendored
@ -135,34 +135,14 @@ jobs:
|
||||
RCSK
|
||||
FastTest:
|
||||
needs: DockerHubPush
|
||||
runs-on: [self-hosted, builder]
|
||||
steps:
|
||||
- name: Set envs
|
||||
run: |
|
||||
cat >> "$GITHUB_ENV" << 'EOF'
|
||||
TEMP_PATH=${{runner.temp}}/fasttest
|
||||
REPO_COPY=${{runner.temp}}/fasttest/ClickHouse
|
||||
CACHES_PATH=${{runner.temp}}/../ccaches
|
||||
EOF
|
||||
- name: Check out repository code
|
||||
uses: ClickHouse/checkout@v1
|
||||
with:
|
||||
clear-repository: true
|
||||
- name: Download changed images
|
||||
uses: actions/download-artifact@v3
|
||||
with:
|
||||
name: changed_images
|
||||
path: ${{ env.TEMP_PATH }}
|
||||
- name: Fast Test
|
||||
run: |
|
||||
cp -r "$GITHUB_WORKSPACE" "$TEMP_PATH"
|
||||
cd "$REPO_COPY/tests/ci" && python3 fast_test_check.py
|
||||
- name: Cleanup
|
||||
if: always()
|
||||
run: |
|
||||
docker ps --quiet | xargs --no-run-if-empty docker kill ||:
|
||||
docker ps --all --quiet | xargs --no-run-if-empty docker rm -f ||:
|
||||
sudo rm -fr "$TEMP_PATH" "$CACHES_PATH"
|
||||
uses: ./.github/workflows/reusable_test.yml
|
||||
with:
|
||||
test_name: Fast tests
|
||||
runner_type: builder
|
||||
batches: 1
|
||||
run_command: |
|
||||
cd "$REPO_COPY/tests/ci"
|
||||
python3 fast_test_check.py
|
||||
CompatibilityCheckX86:
|
||||
needs: [BuilderDebRelease]
|
||||
runs-on: [self-hosted, style-checker]
|
||||
|
@ -24,7 +24,7 @@ from commit_status_helper import (
|
||||
format_description,
|
||||
)
|
||||
from docker_pull_helper import get_image_with_version, DockerImage
|
||||
from env_helper import S3_BUILDS_BUCKET, TEMP_PATH, REPO_COPY
|
||||
from env_helper import S3_BUILDS_BUCKET, TEMP_PATH, REPO_COPY, REPORTS_PATH
|
||||
from get_robot_token import get_best_robot_token
|
||||
from pr_info import FORCE_TESTS_LABEL, PRInfo
|
||||
from report import TestResult, TestResults, read_test_results
|
||||
@ -117,8 +117,9 @@ def main():
|
||||
args = parse_args()
|
||||
|
||||
temp_path = Path(TEMP_PATH)
|
||||
|
||||
temp_path.mkdir(parents=True, exist_ok=True)
|
||||
reports_path = Path(REPORTS_PATH)
|
||||
reports_path.mkdir(parents=True, exist_ok=True)
|
||||
|
||||
pr_info = PRInfo()
|
||||
|
||||
@ -135,7 +136,7 @@ def main():
|
||||
sys.exit(1)
|
||||
sys.exit(0)
|
||||
|
||||
docker_image = get_image_with_version(temp_path, "clickhouse/fasttest")
|
||||
docker_image = get_image_with_version(reports_path, "clickhouse/fasttest")
|
||||
|
||||
s3_helper = S3Helper()
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user