@@ -11,29 +11,16 @@ jobs:
1111 platform : [ubuntu-latest]
1212 runs-on : ${{ matrix.platform }}
1313 steps :
14- - uses : actions/checkout@v2
15- - name : Setup python
16- uses : actions/setup-python@v1
17- with :
18- python-version : ${{ matrix.python-version }}
19- architecture : x64
20-
21- - name : Install Poetry
22- uses : snok/install-poetry@v1
23- with :
24- virtualenvs-create : true
25- virtualenvs-in-project : true
14+ - uses : actions/checkout@v4
2615
27- - name : Cache Poetry virtualenv
28- uses : actions/cache@v4
29- id : cached-poetry-dependencies
16+ - name : Install uv and set the python version
17+ uses : astral-sh/setup-uv@v6
3018 with :
31- path : .venv
32- key : venv- ${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
19+ enable-cache : true
20+ python-version : ${{ matrix.python-version }}
3321
34- - name : Install Dependencies
35- run : poetry install -E full
36- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
22+ - name : Install the project
23+ run : uv sync --locked --all-extras --dev
3724
3825 - name : Run black
3926 run : make black
@@ -52,33 +39,19 @@ jobs:
5239 platform : [ubuntu-latest, macos-13, windows-latest]
5340 runs-on : ${{ matrix.platform }}
5441 steps :
55- - uses : actions/checkout@v2
56- - name : Setup python
57- uses : actions/setup-python@v1
58- with :
59- python-version : ${{ matrix.python-version }}
60- architecture : x64
61-
62- - name : Install Poetry
63- uses : snok/install-poetry@v1
64- with :
65- virtualenvs-create : true
66- virtualenvs-in-project : true
42+ - uses : actions/checkout@v4
6743
68- - name : Cache Poetry virtualenv
69- uses : actions/cache@v4
70- id : cached-poetry-dependencies
44+ - name : Install uv and set the python version
45+ uses : astral-sh/setup-uv@v6
7146 with :
72- path : .venv
73- key : venv-${{ matrix.python-version }}-${{ runner.os }}-${{ hashFiles('**/poetry.lock') }}
74- if : ${{ matrix.platform != 'windows-latest' }} # windows hangs if using a cached venv
47+ enable-cache : true
48+ python-version : ${{ matrix.python-version }}
7549
76- - name : Install Dependencies
77- run : poetry install -E full
78- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
50+ - name : Install the project
51+ run : uv sync --locked --all-extras --dev
7952
8053 - name : Run pytest
81- run : poetry run pytest -vs
54+ run : uv run pytest -vs
8255
8356 pytest_extras :
8457 name : Testing ${{ matrix.extra }} on Python ${{ matrix.python-version }} (${{ matrix.platform}})
@@ -94,32 +67,18 @@ jobs:
9467 runs-on : ${{ matrix.platform }}
9568 steps :
9669 - uses : actions/checkout@v4
97- - name : Setup python
98- uses : actions/setup-python@v1
99- with :
100- python-version : ${{ matrix.python-version }}
101- architecture : x64
102-
103- - name : Install Poetry
104- uses : snok/install-poetry@v1
105- with :
106- virtualenvs-create : true
107- virtualenvs-in-project : true
10870
109- - name : Cache Poetry virtualenv
110- uses : actions/cache@v4
111- id : cached-poetry-dependencies
71+ - name : Install uv and set the python version
72+ uses : astral-sh/setup-uv@v6
11273 with :
113- path : .venv
114- key : venv-${{ matrix.python-version }}-${{ runner.os }}-${{ matrix.extra }}-${{ hashFiles('**/poetry.lock') }}
115- if : ${{ matrix.platform != 'windows-latest' }} # windows hangs if using a cached venv
74+ enable-cache : true
75+ python-version : ${{ matrix.python-version }}
11676
117- - name : Install Dependencies
118- run : poetry install -E ${{ matrix.extra }}
119- if : steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
77+ - name : Install the project
78+ run : uv sync --locked --extra ${{ matrix.extra }}
12079
12180 - name : Run pytest
122- run : poetry run pytest -v -m ${{ matrix.extra }}
81+ run : uv run pytest -v -m ${{ matrix.extra }}
12382
12483 release :
12584 name : Releasing to pypi
@@ -128,22 +87,18 @@ jobs:
12887 runs-on : ubuntu-latest
12988 steps :
13089 - uses : actions/checkout@v2
131- - name : Setup python
132- uses : actions/setup-python@v1
90+
91+ - name : Install uv and set the python version
92+ uses : astral-sh/setup-uv@v6
13393 with :
94+ enable-cache : true
13495 python-version : " 3.9"
135-
136- - name : Install Poetry
137- uses : snok/install-poetry@v1
138-
139- - name : prepare release
140- run : make fiximageurls
14196
14297 - name : prepare release
14398 run : make fiximageurls
14499
145100 - name : build release
146- run : poetry build
101+ run : uv build
147102
148103 - name : Publish package to PyPI
149104 uses : pypa/gh-action-pypi-publish@release/v1
0 commit comments