|
40 | 40 | runs-on: ubuntu-latest
|
41 | 41 | strategy:
|
42 | 42 | matrix:
|
43 |
| - python-version: ["3.8", "3.9", "3.10", "3.11"] |
| 43 | + python-version: ["3.9", "3.10", "3.11", "3.12"] |
44 | 44 | steps:
|
45 | 45 | - name: Checkout source
|
46 | 46 | uses: actions/checkout@v4
|
@@ -98,29 +98,33 @@ jobs:
|
98 | 98 |
|
99 | 99 | # ----------------------------------------Kserve Pydantic V1 Unit Tests--------------------------------------------
|
100 | 100 | - name: Setup kserve pydantic v1 directory
|
| 101 | + if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.12') }} |
101 | 102 | run: |
|
102 | 103 | mkdir -p python/kserve-pydantic-v1
|
103 | 104 | cp -r python/kserve/* python/kserve-pydantic-v1
|
104 | 105 | cd python/kserve-pydantic-v1
|
105 | 106 | # update the lock file without installing dependencies
|
106 | 107 | poetry update "pydantic<2.0" --lock
|
107 | 108 | - name: Load cached kserve pydantic v1 venv
|
| 109 | + if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.12') }} |
108 | 110 | id: cached-kserve-pydantic-v1-dependencies
|
109 | 111 | uses: actions/cache@v3
|
110 | 112 | with:
|
111 | 113 | path: python/kserve-pydantic-v1/.venv
|
112 | 114 | key: kserve-pydantic-v1-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/kserve-pydantic-v1/poetry.lock') }}
|
113 | 115 | # install kserve pydantic v1 dependencies if cache does not exist
|
114 | 116 | - name: Install kserve pydantic v1 dependencies
|
115 |
| - if: steps.cached-kserve-pydantic-v1-dependencies.outputs.cache-hit != 'true' |
| 117 | + if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.12') && steps.cached-kserve-pydantic-v1-dependencies.outputs.cache-hit != 'true' }} |
116 | 118 | run: |
|
117 | 119 | cd python/kserve-pydantic-v1
|
118 | 120 | make install_dependencies
|
119 | 121 | - name: Install kserve pydantic v1
|
| 122 | + if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.12') }} |
120 | 123 | run: |
|
121 | 124 | cd python/kserve-pydantic-v1
|
122 | 125 | make dev_install
|
123 | 126 | - name: Test kserve pydantic v1
|
| 127 | + if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.12') }} |
124 | 128 | run: |
|
125 | 129 | cd python
|
126 | 130 | source kserve-pydantic-v1/.venv/bin/activate
|
@@ -250,33 +254,28 @@ jobs:
|
250 | 254 | # ----------------------------------------Huggingface Server Unit Tests------------------------------------------------
|
251 | 255 | # load cached huggingface venv if cache exists
|
252 | 256 | - name: Load cached huggingface venv
|
253 |
| - if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }} |
254 | 257 | id: huggingface-dependencies
|
255 | 258 | uses: actions/cache@v4
|
256 | 259 | with:
|
257 | 260 | path: /mnt/python/huggingfaceserver-venv
|
258 | 261 | key: huggingface-venv-${{ steps.setup-python.outputs.python-version }}-${{ hashFiles('**/kserve/poetry.lock', '**/huggingfaceserver/poetry.lock') }}
|
259 | 262 | # install huggingface server dependencies if cache does not exist
|
260 | 263 | - name: Configure poetry for huggingface server
|
261 |
| - if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }} |
262 | 264 | run: |
|
263 | 265 | poetry config virtualenvs.path /mnt/python/huggingfaceserver-venv
|
264 | 266 | poetry config virtualenvs.in-project false
|
265 | 267 | - name: Install huggingface dependencies
|
266 |
| - if: ${{ steps.cached-huggingface-dependencies.outputs.cache-hit != 'true' && !startsWith(steps.setup-python.outputs.python-version, '3.8') }} |
267 | 268 | run: |
|
268 | 269 | sudo mkdir -p /mnt/python/huggingfaceserver-venv
|
269 | 270 | # change permission so that poetry can install without sudo
|
270 | 271 | sudo chown -R $USER /mnt/python/huggingfaceserver-venv
|
271 | 272 | cd python/huggingfaceserver
|
272 | 273 | make install_dependencies
|
273 | 274 | - name: Install huggingface server
|
274 |
| - if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }} |
275 | 275 | run: |
|
276 | 276 | cd python/huggingfaceserver
|
277 | 277 | make dev_install
|
278 | 278 | - name: Test huggingfaceserver
|
279 |
| - if: ${{ !startsWith(steps.setup-python.outputs.python-version, '3.8') }} |
280 | 279 | run: |
|
281 | 280 | cd python/huggingfaceserver
|
282 | 281 | poetry run -- pytest --cov=huggingfaceserver -vv
|
|
0 commit comments