Skip to content

Commit b1585d6

Browse files
committed
Use UV instead of pip
1 parent b4dc78e commit b1585d6

2 files changed

Lines changed: 15 additions & 15 deletions

File tree

.github/workflows/main.yml

Lines changed: 12 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -13,20 +13,21 @@ jobs:
1313
runs-on: ubuntu-latest
1414
strategy:
1515
matrix:
16-
python-version: ["3.7", "3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
16+
python-version: ["3.8", "3.9", "3.10", "3.11", "3.12", "3.13"]
17+
env:
18+
UV_PYTHON: ${{ matrix.python-version }}
1719

1820
steps:
19-
- uses: actions/checkout@v3
20-
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v4
22-
with:
23-
python-version: ${{ matrix.python-version }}
21+
- name: Checkout the repository
22+
uses: actions/checkout@main
23+
- name: Install the default version of uv
24+
id: setup-uv
25+
uses: astral-sh/setup-uv@v3
26+
- name: Print the installed version
27+
run: echo "Installed uv version is ${{ steps.setup-uv.outputs.uv-version }}"
28+
- name: Install Python ${{ matrix.python-version }}
29+
run: uv python install ${{ matrix.python-version }}
2430
- name: Install dependencies
2531
run: make env
2632
- name: Test with pytest
2733
run: make test
28-
- name: Publish package
29-
if: github.event_name == 'push' && startsWith(github.ref, 'refs/tags')
30-
uses: pypa/gh-action-pypi-publish@release/v1
31-
with:
32-
password: ${{ secrets.PYPI_API_TOKEN }}

Makefile

Lines changed: 3 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,12 +1,11 @@
11
default: test
22

33
test: env
4-
.env/bin/pytest -v
4+
uv run --extra testing pytest tests
55

66
env: .env/.up-to-date
77

88
.env/.up-to-date: pyproject.toml Makefile
9-
python -m venv .env
10-
.env/bin/pip install -e ".[testing]"
9+
uv venv
10+
uv pip install -e ".[testing]"
1111
touch $@
12-

0 commit comments

Comments
 (0)