@@ -11,12 +11,13 @@ concurrency:
1111
1212jobs :
1313 build :
14- runs-on : ubuntu-22.04
14+ env :
15+ UV_CACHE_DIR : /tmp/.uv-cache
16+ runs-on : ubuntu-24.04
1517 strategy :
1618 matrix :
17- python-version : ["3.12.0", "3.12.x"]
18- poetry-version :
19- ["1.2.2", "1.3.2", "1.4.2", "1.5.1", "1.6.1", "1.7.1", "1.8.3"]
19+ python-version : ["3.12.3", "3.12.x"]
20+ uv-version : ["0.3.5", "0.4.0"]
2021 fail-fast : false
2122
2223 steps :
@@ -28,30 +29,27 @@ jobs:
2829 with :
2930 python-version : ${{ matrix.python-version }}
3031 architecture : x64
31- - name : Install Poetry
32- 33- with :
34- version : ${{ matrix.poetry-version }}
35- virtualenvs-create : true
36- virtualenvs-in-project : true
37- - name : Load cached venv
38- id : cached-poetry-dependencies
32+ - name : Set up uv
33+ run : curl -LsSf https://astral.sh/uv/${{ matrix.uv-version }}/install.sh | sh
34+ - name : Restore uv cache
3935 uses : actions/cache@v4
4036 with :
41- path : .venv
42- key : venv-${{ runner.os }}-${{ steps.setup-python.outputs.python-version }}-${{ matrix.poetry-version }}-${{ hashFiles('**/poetry.lock') }}
37+ path : /tmp/.uv-cache
38+ key : uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
39+ restore-keys : |
40+ uv-${{ runner.os }}-${{ hashFiles('uv.lock') }}
41+ uv-${{ runner.os }}
4342 - name : Install dependencies
44- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
45- run : poetry install --no-interaction --no-root
46- - name : Install library
47- run : poetry install --no-interaction
43+ run : uv sync --all-extras --dev --frozen
4844 - name : Run application
49- run : poetry run myapplication
45+ run : uv run myapplication
5046 - name : Test with pytest
51- run : poetry run pytest tests --cov=src
47+ run : uv run pytest tests --cov=src
48+ - name : Minimize uv cache
49+ run : uv cache prune --ci
5250
5351 build-image :
54- runs-on : ubuntu-22 .04
52+ runs-on : ubuntu-24 .04
5553
5654 steps :
5755 - name : Checkout source code
0 commit comments