Skip to content
This repository was archived by the owner on Apr 14, 2026. It is now read-only.

Commit 4aa0820

Browse files
committed
Update CI to use uv
1 parent b6cc032 commit 4aa0820

4 files changed

Lines changed: 40 additions & 50 deletions

File tree

.github/workflows/docs.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -17,18 +17,19 @@ jobs:
1717
runs-on: ubuntu-latest
1818
steps:
1919
- uses: actions/checkout@v4
20-
- uses: actions/setup-python@v5
20+
21+
- name: Setup uv
22+
uses: astral-sh/setup-uv@v5
2123
with:
22-
python-version-file: pyproject.toml
23-
- name: Install dependencies
24-
run: |
25-
python -m pip install poetry
26-
poetry install --with docs
24+
enable-cache: true
25+
pyproject-file: pyproject.toml
26+
2727
- name: Build docs
2828
run: |
2929
APP_MODULE_NAME=$(ls src -U | head -1) # Get the first module name in the src directory
30-
poetry run pdoc src/"$APP_MODULE_NAME" -o docs_build -t docs/pdoc-theme --docformat google
30+
uv run --frozen --extra docs pdoc src/"$APP_MODULE_NAME" -o docs_build -t docs/pdoc-theme --docformat google
3131
touch docs_build/.nojekyll
32+
3233
- uses: JamesIves/github-pages-deploy-action@v4
3334
with:
3435
folder: docs_build

.github/workflows/publish-pypi.yaml

Lines changed: 8 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -15,16 +15,17 @@ jobs:
1515

1616
steps:
1717
- uses: actions/checkout@v4
18-
- name: Install poetry
19-
run: pipx install poetry
20-
- uses: actions/setup-python@v5
18+
19+
- name: Setup uv
20+
uses: astral-sh/setup-uv@v5
2121
with:
22-
python-version-file: pyproject.toml
23-
cache: poetry
22+
enable-cache: true
23+
pyproject-file: pyproject.toml
24+
2425
- name: Install dependencies and build
2526
run: |
26-
poetry install
27-
poetry build
27+
uv sync --frozen --no-dev --no-install-project
28+
uv build
2829
2930
- name: Publish to PyPi
3031
id: pypi_publish

.github/workflows/test.yaml

Lines changed: 24 additions & 27 deletions
Original file line numberDiff line numberDiff line change
@@ -11,25 +11,24 @@ jobs:
1111
runs-on: ubuntu-latest
1212
steps:
1313
- uses: actions/checkout@v4
14-
- name: Install poetry
15-
run: pipx install poetry
16-
- uses: actions/setup-python@v5
14+
15+
- name: Setup uv
16+
uses: astral-sh/setup-uv@v5
1717
with:
18-
python-version-file: pyproject.toml
19-
cache: poetry
20-
- name: Install dependencies
21-
run: |
22-
poetry install
18+
enable-cache: true
19+
pyproject-file: pyproject.toml
20+
2321
- name: Run tests
2422
id: run-tests
2523
run: >
26-
poetry run pytest \
24+
uv run --frozen pytest \
2725
--junitxml=pytest.xml \
2826
--cov-report=term-missing:skip-covered \
2927
--cov-report=xml:coverage.xml \
3028
--cov=src tests \
3129
--log-level=DEBUG \
3230
--verbose
31+
3332
- name: Upload coverage to Codecov
3433
uses: codecov/codecov-action@v4
3534
with:
@@ -40,30 +39,28 @@ jobs:
4039
runs-on: ubuntu-latest
4140
steps:
4241
- uses: actions/checkout@v4
43-
- name: Install poetry
44-
run: pipx install poetry
45-
- uses: actions/setup-python@v5
42+
43+
- name: Setup uv
44+
uses: astral-sh/setup-uv@v5
4645
with:
47-
python-version-file: pyproject.toml
48-
cache: poetry
49-
- name: Install dependencies
50-
run: |
51-
poetry install
46+
enable-cache: true
47+
pyproject-file: pyproject.toml
48+
5249
- name: Ruff format
53-
run: poetry run ruff format --check
50+
run: uv run ruff format --check
51+
5452
- name: Ruff check
55-
run: poetry run ruff check
53+
run: uv run ruff check
5654

5755
mypy:
5856
runs-on: ubuntu-latest
5957
steps:
6058
- uses: actions/checkout@v4
61-
- name: Install poetry
62-
run: pipx install poetry
63-
- uses: actions/setup-python@v5
59+
60+
- name: Setup uv
61+
uses: astral-sh/setup-uv@v5
6462
with:
65-
python-version: '3.11'
66-
cache: poetry
67-
- run: |
68-
poetry install
69-
poetry run mypy .
63+
enable-cache: true
64+
pyproject-file: pyproject.toml
65+
66+
- run: uv run mypy .

pyproject.toml

Lines changed: 0 additions & 9 deletions
Original file line numberDiff line numberDiff line change
@@ -19,15 +19,6 @@ dev = [
1919
]
2020
docs = ["pdoc>=15.0.0,<16"]
2121

22-
[tool.hatch.build.targets.sdist]
23-
include = ["src/styxdefs"]
24-
25-
[tool.hatch.build.targets.wheel]
26-
include = ["src/styxdefs"]
27-
28-
[tool.hatch.build.targets.wheel.sources]
29-
"src/styxdefs" = "styxdefs"
30-
3122
[build-system]
3223
requires = ["hatchling"]
3324
build-backend = "hatchling.build"

0 commit comments

Comments
 (0)