Skip to content

Commit d230d01

Browse files
authored
Build with uv (#79)
* build with uv * build on pr/main only * bring back extras
1 parent d5de340 commit d230d01

File tree

6 files changed

+1254
-2356
lines changed

6 files changed

+1254
-2356
lines changed

.github/workflows/test.yml

Lines changed: 17 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,10 @@
11
name: Tests
22

3-
on: [push, pull_request]
3+
on:
4+
pull_request:
5+
push:
6+
branches:
7+
- main
48

59
jobs:
610
ruff:
@@ -22,25 +26,15 @@ jobs:
2226
- "3.12"
2327
- "3.13"
2428
steps:
25-
- uses: actions/checkout@v4
26-
- name: Set up Python ${{ matrix.python-version }}
27-
uses: actions/setup-python@v5
28-
with:
29-
python-version: ${{ matrix.python-version }}
30-
- name: Get full python version
31-
id: full-python-version
32-
run: |
33-
echo version=$(python -c "import sys, platform; print('.'.join(str(v) for v in sys.version_info[:3]) + '_' + platform.machine())") >> $GITHUB_OUTPUT
34-
- name: Set up cache
35-
uses: actions/cache@v4
36-
with:
37-
path: .venv
38-
key: ${{ runner.os }}-venv-${{ steps.full-python-version.outputs.version }}-${{ hashFiles('**/poetry.lock') }}
39-
- name: Install and configure Poetry
40-
run: |
41-
pip install poetry
42-
poetry config virtualenvs.in-project true
43-
- name: Install dependencies
44-
run: poetry install --all-extras
45-
- name: Pytest
46-
run: make test
29+
- uses: actions/checkout@v4
30+
- name: Set up Python ${{ matrix.python-version }}
31+
uses: actions/setup-python@v5
32+
with:
33+
python-version: ${{ matrix.python-version }}
34+
- name: Install the latest version of uv
35+
uses: astral-sh/setup-uv@v5
36+
with:
37+
version: latest
38+
enable-cache: true
39+
- name: Run pytest
40+
run: uv run make test

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -8,3 +8,4 @@ __pycache__
88
.\#*
99
build
1010
dist
11+
*.egg-info

Makefile

Lines changed: 5 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,16 +1,16 @@
11
all:
22

33
test:
4-
poetry run pytest --ruff --ruff-format
4+
uv run pytest --ruff --ruff-format
55

66
lint:
7-
poetry run ruff check .
7+
uv run ruff check .
88

99
reformat:
10-
poetry run ruff check --select I --fix .
11-
poetry run ruff format .
10+
uv run ruff check --select I --fix .
11+
uv run ruff format .
1212

1313
clean:
1414

1515
realclean: clean
16-
poetry env remove --all
16+
rm -fr .venv

0 commit comments

Comments
 (0)