1515 matrix :
1616 python-version : ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
1717 dependency-version : ["default", "min"]
18- # Optimize matrix - test min/max on subset of Python versions
1918 exclude :
2019 - python-version : " 3.12"
2120 dependency-version : " min"
@@ -27,36 +26,11 @@ jobs:
2726 steps :
2827 - name : Check out repository
2928 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
30- - name : Setup JFrog
31- uses : ./.github/actions/setup-jfrog
32- - name : Set up python ${{ matrix.python-version }}
33- id : setup-python
34- uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
29+ - name : Setup Poetry
30+ uses : ./.github/actions/setup-poetry
3531 with :
3632 python-version : ${{ matrix.python-version }}
37- - name : Install Poetry
38- run : |
39- pip install poetry==2.2.1
40- poetry config virtualenvs.create true
41- poetry config virtualenvs.in-project true
42- poetry config installer.parallel true
43- - name : Configure Poetry for JFrog
44- run : |
45- poetry config repositories.jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple
46- poetry config http-basic.jfrog gha-service-account "${JFROG_ACCESS_TOKEN}"
47- poetry source add --priority=primary jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple
48- poetry lock
49- - name : Load cached venv
50- id : cached-poetry-dependencies
51- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
52- with :
53- path : .venv
54- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ matrix.dependency-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
55- - name : Install dependencies
56- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
57- run : poetry install --no-interaction --no-root
58- - name : Install library
59- run : poetry install --no-interaction
33+ cache-suffix : " ${{ matrix.dependency-version }}-"
6034 - name : Install Python tools for custom versions
6135 if : matrix.dependency-version != 'default'
6236 run : poetry run pip install toml packaging
@@ -94,41 +68,18 @@ jobs:
9468
9569 steps :
9670 - name : Check out repository
97- uses : actions/checkout@ee0669bd1cc54295c223e0bb666b733df41de1c5 # v2
98- - name : Setup JFrog
99- uses : ./.github/actions/setup-jfrog
100- - name : Set up python ${{ matrix.python-version }}
101- id : setup-python
102- uses : actions/setup-python@e9aba2c848f5ebd159c070c61ea2c4e2b122355e # v2
103- with :
104- python-version : ${{ matrix.python-version }}
105- - name : Install Poetry
106- run : |
107- pip install poetry==2.2.1
108- poetry config virtualenvs.create true
109- poetry config virtualenvs.in-project true
110- poetry config installer.parallel true
111- - name : Configure Poetry for JFrog
112- run : |
113- poetry config repositories.jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple
114- poetry config http-basic.jfrog gha-service-account "${JFROG_ACCESS_TOKEN}"
115- poetry source add --priority=primary jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple
116- poetry lock
117- - name : Load cached venv
118- id : cached-poetry-dependencies
119- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
120- with :
121- path : .venv-pyarrow
122- key : venv-pyarrow-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ matrix.dependency-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
123- - name : Install dependencies
124- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
125- run : poetry install --no-interaction --no-root
71+ uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
12672 - name : Install Kerberos system dependencies
12773 run : |
12874 sudo apt-get update
12975 sudo apt-get install -y libkrb5-dev
130- - name : Install library
131- run : poetry install --no-interaction --all-extras
76+ - name : Setup Poetry
77+ uses : ./.github/actions/setup-poetry
78+ with :
79+ python-version : ${{ matrix.python-version }}
80+ install-args : " --all-extras"
81+ cache-path : " .venv-pyarrow"
82+ cache-suffix : " pyarrow-${{ matrix.dependency-version }}-"
13283 - name : Install Python tools for custom versions
13384 if : matrix.dependency-version != 'default'
13485 run : poetry run pip install toml packaging
@@ -158,36 +109,10 @@ jobs:
158109 steps :
159110 - name : Check out repository
160111 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
161- - name : Setup JFrog
162- uses : ./.github/actions/setup-jfrog
163- - name : Set up python ${{ matrix.python-version }}
164- id : setup-python
165- uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
112+ - name : Setup Poetry
113+ uses : ./.github/actions/setup-poetry
166114 with :
167115 python-version : ${{ matrix.python-version }}
168- - name : Install Poetry
169- run : |
170- pip install poetry==2.2.1
171- poetry config virtualenvs.create true
172- poetry config virtualenvs.in-project true
173- poetry config installer.parallel true
174- - name : Configure Poetry for JFrog
175- run : |
176- poetry config repositories.jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple
177- poetry config http-basic.jfrog gha-service-account "${JFROG_ACCESS_TOKEN}"
178- poetry source add --priority=primary jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple
179- poetry lock
180- - name : Load cached venv
181- id : cached-poetry-dependencies
182- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
183- with :
184- path : .venv
185- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
186- - name : Install dependencies
187- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
188- run : poetry install --no-interaction --no-root
189- - name : Install library
190- run : poetry install --no-interaction
191116 - name : Black
192117 run : poetry run black --check src
193118
@@ -201,37 +126,11 @@ jobs:
201126 steps :
202127 - name : Check out repository
203128 uses : actions/checkout@34e114876b0b11c390a56381ad16ebd13914f8d5 # v4
204- - name : Setup JFrog
205- uses : ./.github/actions/setup-jfrog
206- - name : Set up python ${{ matrix.python-version }}
207- id : setup-python
208- uses : actions/setup-python@a26af69be951a213d495a4c3e4e4022e16d87065 # v5
129+ - name : Setup Poetry
130+ uses : ./.github/actions/setup-poetry
209131 with :
210132 python-version : ${{ matrix.python-version }}
211- - name : Install Poetry
212- run : |
213- pip install poetry==2.2.1
214- poetry config virtualenvs.create true
215- poetry config virtualenvs.in-project true
216- poetry config installer.parallel true
217- - name : Configure Poetry for JFrog
218- run : |
219- poetry config repositories.jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple
220- poetry config http-basic.jfrog gha-service-account "${JFROG_ACCESS_TOKEN}"
221- poetry source add --priority=primary jfrog https://databricks.jfrog.io/artifactory/api/pypi/db-pypi/simple
222- poetry lock
223- - name : Load cached venv
224- id : cached-poetry-dependencies
225- uses : actions/cache@0057852bfaa89a56745cba8c7296529d2fc39830 # v4
226- with :
227- path : .venv
228- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ github.event.repository.name }}-${{ hashFiles('**/poetry.lock') }}
229- - name : Install dependencies
230- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
231- run : poetry install --no-interaction --no-root
232- - name : Install library
233- run : poetry install --no-interaction
234133 - name : Mypy
235134 run : |
236- mkdir .mypy_cache # Workaround for bad error message "error: --install-types failed (no mypy cache directory)"; see https://github.com/python/mypy/issues/10768#issuecomment-2178450153
135+ mkdir .mypy_cache
237136 poetry run mypy --install-types --non-interactive src
0 commit comments