-
Notifications
You must be signed in to change notification settings - Fork 65
139 lines (132 loc) · 4.01 KB
/
on_push.yml
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
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
name: 'Lint and Test'
on:
pull_request:
branches:
- main
paths-ignore:
- 'VERSION'
- 'LICENSE'
- '**.md'
- 'examples'
- 'publish.yaml'
- '.github/workflows/clickhouse_ci.yml'
- '.github/workflows/on_push.yml'
workflow_dispatch:
push:
branches-ignore:
- '*_test'
- '*_dev'
- '*_build'
- main
paths-ignore:
- 'VERSION'
- 'LICENSE'
- '**.md'
- 'examples'
- 'publish.yaml'
- '.github/workflows/clickhouse_ci.yml'
- '.github/workflows/on_push.yml'
jobs:
lint:
runs-on: ubuntu-latest
name: PyLint
steps:
- uses: actions/checkout@v3
- name: Set up Python (3.11)
uses: actions/setup-python@v4
with:
python-version: 3.11
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install setuptools wheel
pip install -r tests/test_requirements.txt
pip install pylint==2.17
python setup.py build_ext --inplace
- name: Run Pylint
run: |
pylint clickhouse_connect
pylint tests
pylint examples
tests:
runs-on: ubuntu-latest
needs: lint
strategy:
matrix:
python-version:
- '3.8'
- '3.9'
- '3.10'
- '3.11'
- '3.12'
clickhouse-version:
- '23.3'
- '23.7'
- '23.8'
- '23.9'
- latest
name: Local Tests Py=${{ matrix.python-version }} CH=${{ matrix.clickhouse-version }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Run ClickHouse Container
run: docker run
-d
-p 8123:8123
--name clickhouse
-v /var/lib/clickhouse
-v ${{ github.workspace }}/tests/integration_tests/test_config.xml:/etc/clickhouse-server/conf.d/test_config.xml
--ulimit nofile=262144:262144
clickhouse/clickhouse-server:${{ matrix.clickhouse-version }}
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install pip
run: python -m pip install --upgrade pip
- name: Install Test Dependencies
run: pip install -r tests/test_requirements.txt
- name: Build cython extensions
run: python setup.py build_ext --inplace
- name: "Add distribution info" # This lets SQLAlchemy find entry points
run: python setup.py develop
- name: Run tests
env:
CLICKHOUSE_CONNECT_TEST_DOCKER: 'False'
CLICKHOUSE_CONNECT_TEST_FUZZ: 50
SQLALCHEMY_SILENCE_UBER_WARNING: 1
run: pytest tests
cloud-tests:
runs-on: ubuntu-latest
name: Cloud Tests Py=${{ matrix.python-version }}
needs: tests
strategy:
matrix:
python-version:
- '3.10'
- '3.11'
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v4
with:
python-version: ${{ matrix.python-version }}
- name: Install dependencies
run: |
python -m pip install --upgrade pip
pip install -r tests/test_requirements.txt
- name: Build cython extensions
run: python setup.py build_ext --inplace
- name: "Add distribution info" # This lets SQLAlchemy find entry points
run: python setup.py develop
- name: Run tests
env:
CLICKHOUSE_CONNECT_TEST_FUZZ: 10
CLICKHOUSE_CONNECT_TEST_DOCKER: 'False'
CLICKHOUSE_CONNECT_TEST_PORT: 8443
CLICKHOUSE_CONNECT_TEST_INSERT_QUORUM: 3
CLICKHOUSE_CONNECT_TEST_HOST: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_HOST }}
CLICKHOUSE_CONNECT_TEST_PASSWORD: ${{ secrets.INTEGRATIONS_TEAM_TESTS_CLOUD_PASSWORD }}
SQLALCHEMY_SILENCE_UBER_WARNING: 1
run: pytest tests/integration_tests