-
Notifications
You must be signed in to change notification settings - Fork 33
89 lines (75 loc) · 2.5 KB
/
Copy pathci.yml
File metadata and controls
89 lines (75 loc) · 2.5 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
77
78
79
80
81
82
83
84
85
86
87
88
89
name: Integration Tests
on:
push:
branches: [main]
pull_request:
branches: [main]
workflow_dispatch:
jobs:
integration-test:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ['3.10', '3.11', '3.12', '3.13']
starrocks-version: ['3.5.14', '4.0-latest', '4.1.0-rc01']
steps:
- name: Checkout code
uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
- name: Install Python
run: uv venv --python ${{ matrix.python-version }}
- name: Install MySQL client
run: |
sudo apt-get update
sudo apt-get install -y mysql-client=8.0*
- name: Install dependencies
run: |
source .venv/bin/activate
uv pip install -r dev_requirements.txt
uv pip install -e .
- name: Start Iceberg stack
run: docker compose -f .github/docker-compose.iceberg.yml up --detach --wait --wait-timeout 400
env:
STARROCKS_VERSION: ${{ matrix.starrocks-version }}
- name: Configure StarRocks and create Iceberg catalog
run: |
mysql -h 127.0.0.1 -P 9030 -u root -e "ADMIN SET FRONTEND CONFIG ('default_replication_num' = '1');"
mysql -h 127.0.0.1 -P 9030 -u root -e "
CREATE EXTERNAL CATALOG iceberg_catalog
PROPERTIES (
'type'='iceberg',
'iceberg.catalog.type'='rest',
'iceberg.catalog.uri'='http://iceberg-rest:8181',
'iceberg.catalog.warehouse'='warehouse',
'aws.s3.access_key'='admin',
'aws.s3.secret_key'='password',
'aws.s3.endpoint'='http://minio:9000',
'aws.s3.enable_path_style_access'='true'
);"
- name: Run unit tests
run: |
source .venv/bin/activate
uv run pytest tests/unit
- name: Wait for StarRocks internal tables
run: sleep 60
- name: Run integration tests
run: |
source .venv/bin/activate
uv run pytest tests/functional
- name: Stop Iceberg stack
if: always()
run: docker compose -f .github/docker-compose.iceberg.yml down -v
ci:
name: CI
runs-on: ubuntu-latest
if: always()
needs: [integration-test]
steps:
- name: Check matrix results
run: |
if [ "${{ needs.integration-test.result }}" != "success" ]; then
echo "Integration tests failed"
exit 1
fi