Repository navigation
74 lines (70 loc) · 2.03 KB
/
Copy pathci.yml
File metadata and controls
74 lines (70 loc) · 2.03 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
name: CI
on:
push:
branches: ['**']
pull_request:
workflow_call:
permissions:
contents: read
jobs:
test:
runs-on: ubuntu-latest
timeout-minutes: 15
strategy:
fail-fast: false
matrix:
python-version: ['3.11', '3.12', '3.13', '3.14']
services:
clickhouse:
image: clickhouse/clickhouse-server:25.8
env:
CLICKHOUSE_USER: test
CLICKHOUSE_PASSWORD: test
CLICKHOUSE_DEFAULT_ACCESS_MANAGEMENT: '1'
ports:
- 8123:8123
options: >-
--health-cmd "clickhouse-client --user test --password test --query 'SELECT 1'"
--health-interval 5s
--health-timeout 5s
--health-retries 20
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: python -m pip install -e '.[dev]'
- run: python -m pytest --run-integration
env:
CLICKHOUSE_USER: test
CLICKHOUSE_PASSWORD: test
quality-and-build:
runs-on: ubuntu-latest
timeout-minutes: 10
steps:
- uses: actions/checkout@v7
- uses: actions/setup-python@v7
with:
python-version: '3.14'
cache: pip
- run: python -m pip install -e '.[dev]'
- run: ruff check .
- run: ruff format --check .
- run: python -m build
- run: python -m twine check --strict dist/*
- name: Test the installed wheel outside the source tree
run: |
python -m venv /tmp/wheel-test
/tmp/wheel-test/bin/python -m pip install dist/*.whl pytest
cp -r tests /tmp/wheel-test/tests
cp pyproject.toml /tmp/wheel-test/
cd /tmp/wheel-test
bin/python -m pytest tests -m 'not integration'
- name: Save validated distributions
uses: actions/upload-artifact@v7
with:
name: python-distributions
path: dist/*
if-no-files-found: error
retention-days: 14