-
-
Notifications
You must be signed in to change notification settings - Fork 160
86 lines (76 loc) · 2.56 KB
/
Copy pathactions.yml
File metadata and controls
86 lines (76 loc) · 2.56 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
on: [push, pull_request]
name: build
jobs:
tests:
runs-on: ubuntu-22.04
strategy:
matrix:
python-version:
- "3.7"
- "3.8"
- "3.9"
- "3.10"
- "3.11"
- "3.12"
include:
- clickhouse-version: 18.14.9
clickhouse-org: yandex
- clickhouse-version: 19.3.5
clickhouse-org: yandex
- clickhouse-version: 22.5.1.2079
clickhouse-org: clickhouse
- clickhouse-version: 23.8.4.69
clickhouse-org: clickhouse
services:
clickhouse-server:
image: ${{ matrix.clickhouse-org }}/clickhouse-server:${{ matrix.clickhouse-version }}
ports:
- 8123:8123
- 9000:9000
name: "Py=${{ matrix.python-version }}; CH=${{ matrix.clickhouse-version }}"
steps:
- uses: actions/checkout@v5
- name: Install uv
uses: astral-sh/setup-uv@v6
with:
python-version: ${{ matrix.python-version }}
architecture: x64
- name: Install the project
run: uv sync --python ${{ matrix.python-version }} --locked --all-extras --dev
# - name: Lint
# run: |
# uv run --python ${{ matrix.python-version }} ruff check
# uv run --python ${{ matrix.python-version }} ruff format --check
- name: Install test requirements
run: |
# Limit each test time execution.
uv pip install --python ${{ matrix.python-version }} pytest-timeout
- name: Run tests
run: coverage run --source=clickhouse_sqlalchemy -m pytest --timeout=10 -v
timeout-minutes: 2
- name: Set up Python for coverage submission
if: ${{ matrix.python-version == '2.7' }}
uses: actions/setup-python@v5
with:
python-version: 3.8
architecture: x64
- name: Install coveralls
run: |
# Newer coveralls do not work with github actions.
uv pip install --python ${{ matrix.python-version }} "coveralls<3.0.0"
- name: Upload coverage
run: coveralls
env:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
COVERALLS_PARALLEL: true
COVERALLS_FLAG_NAME: ${{ matrix.python-version }} CH=${{ matrix.clickhouse-version }}
coveralls-finished:
name: Indicate completion to coveralls.io
needs: tests
runs-on: ubuntu-latest
steps:
- name: Finished
uses: coverallsapp/github-action@v2.3.3
with:
github-token: ${{ secrets.GITHUB_TOKEN }}
parallel-finished: true