-
Notifications
You must be signed in to change notification settings - Fork 1
76 lines (63 loc) · 2.27 KB
/
clickhouse-tests.yml
File metadata and controls
76 lines (63 loc) · 2.27 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
name: Clickhouse Tests
on:
workflow_call:
env:
DEFAULT_PYTHON: '3.13'
jobs:
tests:
name: Run Clickhouse tests
runs-on: ubuntu-latest
steps:
- name: Checkout code
uses: actions/checkout@v6
- name: Start Clickhouse
run: |
docker compose -f docker-compose.test.yml --profile all down -v --remove-orphans
docker compose -f docker-compose.test.yml --profile clickhouse up -d db rabbitmq horizon test-clickhouse
- name: Set up QEMU
uses: docker/setup-qemu-action@v4
- name: Set up Docker Buildx
uses: docker/setup-buildx-action@v3
- name: Build Worker Image
uses: docker/build-push-action@v6
with:
context: .
tags: mtsrus/syncmaster-worker:${{ github.sha }}
target: test
file: docker/Dockerfile.worker
load: true
cache-from: type=gha,scope=test
cache-to: type=gha,scope=test,mode=max
- name: Start worker
run: |
docker compose -f docker-compose.test.yml --profile clickhouse up -d --wait --wait-timeout 200
env:
WORKER_IMAGE_TAG: ${{ github.sha }}
- name: Run Clickhouse Tests
run: |
docker compose -f ./docker-compose.test.yml --profile clickhouse exec -T worker coverage run -m pytest -vvv -s ./tests/test_integration/test_run_transfer -m clickhouse --junitxml=/app/reports/junit/${RANDOM}.xml
- name: Dump worker logs on failure
if: failure()
uses: jwalton/gh-docker-logs@v2
with:
images: mtsrus/syncmaster-worker
dest: ./logs
# This is important, as coverage is exported after receiving SIGTERM
- name: Shutdown
if: always()
run: |
docker compose -f docker-compose.test.yml --profile all down -v --remove-orphans
- name: Upload worker logs
uses: actions/upload-artifact@v7
if: failure()
with:
name: worker-logs-clickhouse
path: logs/*
- name: Upload coverage results
if: success() || failure()
uses: actions/upload-artifact@v7
with:
name: coverage-clickhouse
path: reports/*
# https://github.com/actions/upload-artifact/issues/602
include-hidden-files: true