-
Notifications
You must be signed in to change notification settings - Fork 1
61 lines (59 loc) · 1.63 KB
/
python.yml
File metadata and controls
61 lines (59 loc) · 1.63 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
name: Python CI
on:
push:
branches: [main]
paths:
- ".github/workflows/python.yml"
- "python-client/**"
pull_request:
branches: [main]
paths:
- ".github/workflows/python.yml"
- "python-client/**"
jobs:
test:
runs-on: ubuntu-latest
strategy:
matrix:
python-version: ["3.10", 3.11, 3.12, 3.13]
pandas:
- {spec: ">2.2,<3.0", key: "2.x"}
- {spec: ">=3.0,<4.0", key: "3.x"}
defaults:
run:
working-directory: ./python-client
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- run: pip install -r requirements.txt
- uses: actions/cache@v4
with:
path: ~/.cache/uv
key: uv-${{ matrix.python-version }}-${{ matrix.pandas.key }}-${{ hashFiles('uv.lock') }}
- run: |
uv sync --frozen --all-extras
uv pip install "pandas${{ matrix.pandas.spec }}"
- run: uv run pytest
lint:
runs-on: ubuntu-latest
defaults:
run:
working-directory: ./python-client
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: 3.13
cache: pip
- run: pip install -r requirements.txt
- uses: actions/cache@v4
with:
path: ~/.cache/uv
key: uv-3.13-${{ hashFiles('uv.lock') }}
- run: uv sync --frozen --all-extras
- run: uv run uv-sort --check
- run: uv run ruff check --output-format github src/
- run: uv run ruff format --check src/