Skip to content

Commit 9a98792

Browse files
committed
ci: poetry -> uv
1 parent bf75192 commit 9a98792

File tree

6 files changed

+24
-73
lines changed

6 files changed

+24
-73
lines changed

.github/ISSUE_TEMPLATE/bug-report-🐞.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -46,14 +46,14 @@ A clear and concise description of what you expected to happen.
4646

4747
**Environment information (please complete the following information):**
4848
- OS: [e.g. Ubuntu Linux]
49-
- Software versions (Docker, Python, Nix, Poetry, if applicable)
49+
- Software versions (Docker, Python, Nix, Uv, if applicable)
5050

5151
We recommend you execute and paste the results of those commands in this issue so we can get a sense of your environment:
5252

5353
- Linux/Darwin kernel version with `uname -avr`
5454
- Linux distribution with `cat /etc/lsb-release`
5555
- MacOS distribution with `sw_vers`
56-
- Poetry version with `poetry env info`
56+
- Uv version with `uv version`
5757
- Nix install info with `nix flake info`
5858
- Pip install info `pip freeze`
5959
- Unblob dependencies info with `unblob --show-external-dependencies`

.github/actions/setup-dependencies/action.yml

Lines changed: 7 additions & 29 deletions
Original file line numberDiff line numberDiff line change
@@ -13,35 +13,13 @@ runs:
1313
run: sudo unblob/install-deps.sh
1414
shell: bash
1515

16-
- name: Setup Python
17-
uses: actions/setup-python@v5
16+
- name: Install uv & Python
17+
uses: astral-sh/setup-uv@v5
1818
with:
19-
python-version: ${{ inputs.python-version }}
19+
enable-cache: true
20+
cache-dependency-glob: "uv.lock"
21+
python-version: ${{ matrix.python-version }}
2022

21-
- name: Restore pip cache
22-
uses: actions/cache@v4
23-
with:
24-
path: ~/.cache/pip
25-
key: pip-${{ inputs.python-version }}
26-
27-
- name: Pip install
28-
run: python -m pip install --upgrade pip poetry
29-
shell: bash
30-
31-
- name: Restore poetry cache
32-
uses: actions/cache@v4
33-
with:
34-
path: |
35-
~/.cache/pypoetry/cache
36-
~/.cache/pypoetry/artifacts
37-
key: poetry-cache-and-artifacts-${{ inputs.python-version }}
38-
39-
- name: Restore virtualenvs
40-
uses: actions/cache@v4
41-
with:
42-
path: ~/.cache/pypoetry/virtualenvs
43-
key: venv-${{ hashFiles('poetry.lock') }}-${{ inputs.python-version }}
44-
45-
- name: Poetry install
46-
run: poetry install --with dev
23+
- name: Install the project
24+
run: uv sync
4725
shell: bash

.github/workflows/build-publish-image.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,8 +34,8 @@ jobs:
3434
- name: Setup 3rd party dependencies
3535
uses: ./.github/actions/setup-dependencies
3636

37-
- name: Poetry build
38-
run: poetry build --format wheel
37+
- name: uv build
38+
run: uv build --wheel
3939

4040
- name: Docker meta
4141
id: meta

.github/workflows/documentation.yml

Lines changed: 8 additions & 36 deletions
Original file line numberDiff line numberDiff line change
@@ -13,43 +13,15 @@ jobs:
1313
- name: Checkout source code
1414
uses: actions/checkout@v4
1515

16-
- name: Setup Python
17-
uses: actions/setup-python@v5
16+
- name: Install uv & Python
17+
uses: astral-sh/setup-uv@v5
1818
with:
19-
python-version: 3.9
19+
enable-cache: true
20+
cache-dependency-glob: "uv.lock"
21+
python-version: "3.9"
2022

21-
- name: Setup Python
22-
uses: actions/setup-python@v5
23-
with:
24-
python-version: 3.9
25-
26-
- name: Restore pip cache
27-
uses: actions/cache@v4
28-
with:
29-
path: ~/.cache/pip
30-
key: pip-3.9
31-
32-
- name: Upgrade pip and install poetry
33-
run: python -m pip install --upgrade pip poetry
34-
shell: bash
35-
36-
- name: Restore poetry cache
37-
uses: actions/cache@v4
38-
with:
39-
path: |
40-
~/.cache/pypoetry/cache
41-
~/.cache/pypoetry/artifacts
42-
key: poetry-cache-and-artifacts-3.9
43-
44-
- name: Restore virtualenvs
45-
uses: actions/cache@v4
46-
with:
47-
path: ~/.cache/pypoetry/virtualenvs
48-
key: venv-${{ hashFiles('poetry.lock') }}-3.9
49-
50-
- name: Poetry install
51-
run: poetry install --only docs
52-
shell: bash
23+
- name: Install the project
24+
run: uv sync --only-group docs
5325

5426
- name: Generate documentation
55-
run: poetry run mkdocs gh-deploy --force
27+
run: uv run mkdocs gh-deploy --force

.github/workflows/release.yml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,6 +15,7 @@ jobs:
1515
- name: Setup dependencies
1616
uses: ./.github/actions/setup-dependencies
1717

18-
- run: poetry publish --build
18+
- run: uv build
19+
- run: uv publish
1920
env:
20-
POETRY_PYPI_TOKEN_PYPI: ${{secrets.POETRY_PYPI_TOKEN_PYPI}}
21+
UV_PUBLISH_TOKEN: ${{secrets.POETRY_PYPI_TOKEN_PYPI}}

.github/workflows/run-tests.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -41,7 +41,7 @@ jobs:
4141
uses: ./.github/actions/setup-dependencies
4242

4343
- name: Check - pyright
44-
run: poetry run pyright .
44+
run: uv run pyright .
4545

4646
run_tests:
4747
name: Run tests
@@ -62,4 +62,4 @@ jobs:
6262
uses: ./.github/actions/setup-git-lfs
6363

6464
- name: Run pytest
65-
run: poetry run pytest -vvv
65+
run: uv run pytest -vvv

0 commit comments

Comments
 (0)