Skip to content

Commit 0333c1d

Browse files
committed
port workflows to uv
1 parent a5524c4 commit 0333c1d

6 files changed

Lines changed: 21 additions & 41 deletions

File tree

.github/workflows/python-tests.yaml

Lines changed: 8 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,12 @@ jobs:
1919
runs-on: ubuntu-latest
2020
steps:
2121
- uses: actions/checkout@v6
22-
- name: Set up Python 3.10
23-
id: python
24-
uses: actions/setup-python@v6
22+
- name: Set up uv
23+
uses: astral-sh/setup-uv@v5
2524
with:
26-
python-version: 3.10
25+
python-version: "3.10"
2726
- name: Install dependencies
28-
run: |
29-
python3 -m pip install --upgrade pip
30-
python3 -m pip install -e .
27+
run: uv sync
3128

3229
- name: Clone Repo
3330
run: git clone https://github.com/Azure-Samples/azure-search-openai-demo
@@ -54,15 +51,12 @@ jobs:
5451
runs-on: ubuntu-latest
5552
steps:
5653
- uses: actions/checkout@v6
57-
- name: Set up Python 3.10
58-
id: python
59-
uses: actions/setup-python@v6
54+
- name: Set up uv
55+
uses: astral-sh/setup-uv@v5
6056
with:
61-
python-version: 3.10
57+
python-version: "3.10"
6258
- name: Install dependencies
63-
run: |
64-
python3 -m pip install --upgrade pip
65-
python3 -m pip install -e .
59+
run: uv sync
6660

6761
- name: Test Check Broken Paths in markdown-checker
6862
if: always()

.github/workflows/python-types-lint-format.yaml

Lines changed: 4 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -28,14 +28,11 @@ jobs:
2828
python_version: ["3.10", "3.11", "3.12", "3.13"]
2929
steps:
3030
- uses: actions/checkout@v6
31-
- uses: actions/setup-python@v6
31+
- uses: astral-sh/setup-uv@v5
3232
with:
3333
python-version: ${{ matrix.python_version }}
34-
architecture: x64
3534
- name: Install dependencies
36-
run: |
37-
python3 -m pip install --upgrade pip
38-
python3 -m pip install -e '.[dev]'
35+
run: uv sync --extra dev
3936

4037
- name: Run type check
4138
run: python3 -m mypy .
@@ -50,14 +47,11 @@ jobs:
5047
python_version: ["3.10", "3.11", "3.12", "3.13"]
5148
steps:
5249
- uses: actions/checkout@v6
53-
- uses: actions/setup-python@v6
50+
- uses: astral-sh/setup-uv@v5
5451
with:
5552
python-version: ${{ matrix.python_version }}
56-
architecture: x64
5753
- name: Install dependencies
58-
run: |
59-
python3 -m pip install --upgrade pip
60-
python3 -m pip install -e '.[lint]'
54+
run: uv sync --extra lint
6155

6256
- name: Run lint check
6357
run: python3 -m ruff check .

.github/workflows/python-versions-tests.yaml

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -19,14 +19,11 @@ jobs:
1919
python_version: [ "3.10", "3.11", "3.12", "3.13"]
2020
steps:
2121
- uses: actions/checkout@v6
22-
- uses: actions/setup-python@v6
22+
- uses: astral-sh/setup-uv@v5
2323
with:
2424
python-version: ${{ matrix.python_version }}
25-
architecture: x64
2625
- name: Install dependencies
27-
run: |
28-
python3 -m pip install --upgrade pip
29-
python3 -m pip install -e .
26+
run: uv sync
3027

3128
- name: Clone Testing Repositories
3229
run: |

.github/workflows/release.yml

Lines changed: 5 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -18,19 +18,14 @@ jobs:
1818
steps:
1919
- name: Check out code from Github
2020
uses: actions/checkout@v6
21-
- name: Set up Python ${{ env.DEFAULT_PYTHON }}
21+
- name: Set up uv
2222
id: python
23-
uses: actions/setup-python@v6
23+
uses: astral-sh/setup-uv@v5
2424
with:
2525
python-version: ${{ env.DEFAULT_PYTHON }}
26-
- name: Install requirements
27-
run: python3 -m pip install build twine
2826
- name: Build distributions
29-
run: python3 -m build
27+
run: uv build
3028
- name: Upload to PyPI
3129
env:
32-
TWINE_REPOSITORY: pypi
33-
TWINE_USERNAME: __token__
34-
TWINE_PASSWORD: ${{ secrets.PYPI_API_TOKEN }}
35-
run: |
36-
twine upload --verbose dist/*
30+
UV_PUBLISH_TOKEN: ${{ secrets.PYPI_API_TOKEN }}
31+
run: uv publish

.readthedocs.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ build:
1111
python: "3.10"
1212
jobs:
1313
pre_build:
14-
- pip install mkdocs-material mkdocstrings[python] pymdown-extensions
14+
- uv pip install mkdocs-material mkdocstrings[python] pymdown-extensions
1515

1616
mkdocs:
1717
configuration: docs/mkdocs.yml

CONTRIBUTING.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -11,7 +11,7 @@ This repository is open for everyone to contribute and is maintained by [John Az
1111
To run the the package locally (Lean more: [here](https://packaging.python.org/en/latest/guides/distributing-packages-using-setuptools/#working-in-development-mode)):
1212

1313
```shell
14-
pip install -e .
14+
uv sync
1515
```
1616

1717
Any changes you do will take effect immediately.

0 commit comments

Comments
 (0)