Repository navigation
101 lines (82 loc) · 2.7 KB
/
Copy pathtest-python.yml
File metadata and controls
101 lines (82 loc) · 2.7 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
90
91
92
93
94
95
96
97
98
99
100
101
# This workflow will build and test the Rust code in this repository. There are
# separate workflows for testing the python portion of the code base.
#
# This file is *not* generated from automation and is manually maintained.
#
name: "[tower] Test python"
on:
pull_request:
schedule:
# Detect new stable PyArrow/PyIceberg releases even when no PR is open.
- cron: "17 6 * * *"
concurrency:
group: ${{ github.workflow }}-${{ github.ref }}
cancel-in-progress: true
jobs:
test:
if: github.event_name == 'pull_request'
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os:
- ubuntu-latest
steps:
- uses: actions/checkout@v6
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
- name: "Set up Python"
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Check Python formatting with Black
run: uv run --group dev black --check --diff .
- name: Check types with mypy
run: uv run --group dev mypy src/tower/__init__.py --no-error-summary
- name: Run tests
run: uv run pytest tests
iceberg-compatibility:
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
include:
- dependency_set: minimum
pyarrow: "pyarrow==23.0.1"
pyiceberg: "pyiceberg[sql-sqlite]==0.11.1"
- dependency_set: latest
pyarrow: "pyarrow"
pyiceberg: "pyiceberg[sql-sqlite]"
steps:
- uses: actions/checkout@v6
- name: Install the latest version of uv
uses: astral-sh/setup-uv@v6
- name: "Set up Python"
uses: actions/setup-python@v6
with:
python-version-file: ".python-version"
- name: Install the project
run: uv sync --locked --all-extras --dev
- name: Resolve ${{ matrix.dependency_set }} Iceberg dependencies
run: >-
uv pip install
--python .venv/bin/python
--strict
--resolution highest
--upgrade-package pyarrow
--upgrade-package pyiceberg
'${{ matrix.pyarrow }}'
'${{ matrix.pyiceberg }}'
- name: Show resolved dependency versions
run: |
uv run --no-sync python - <<'PY'
from importlib.metadata import version
print(f"PyArrow {version('pyarrow')}; PyIceberg {version('pyiceberg')}")
PY
- name: Run Iceberg compatibility tests
run: >-
uv run --no-sync pytest
tests/tower/test_table*.py
tests/tower/test_storage.py