Skip to content

Commit 900cff9

Browse files
committed
ci: fully integrate GitHub Actions with uv project workflow
- Replace legacy `uv pip install` with `uv sync --all-groups` for locked dev environments - Remove manual `requirements.txt` installation in favor of pyproject.toml discovery - Clean up `uv build` by removing unnecessary `--no-build-isolation` flag - Leverage `astral-sh/setup-uv` caching for faster test and publish runs
1 parent 5cd915a commit 900cff9

File tree

2 files changed

+21
-14
lines changed

2 files changed

+21
-14
lines changed

.github/workflows/cd_pypi.yml

Lines changed: 9 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -19,18 +19,20 @@ jobs:
1919

2020
steps:
2121
- name: Checkout
22-
uses: actions/checkout@v3
22+
uses: actions/checkout@v6
2323

2424
- name: Set up Python
25-
uses: actions/setup-python@v4
25+
uses: actions/setup-python@v6
2626
with:
2727
python-version: '3.10'
2828

29-
- name: Install dependencies
30-
run: pip install -r requirements.txt
31-
29+
- name: Install uv
30+
uses: astral-sh/setup-uv@v7
31+
with:
32+
enable-cache: true
33+
3234
- name: Build package
33-
run: python setup.py sdist bdist_wheel
35+
run: uv build
3436

3537
- name: Publish package
36-
uses: pypa/gh-action-pypi-publish@release/v1
38+
run: uv publish

.github/workflows/test.yaml

Lines changed: 12 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -16,16 +16,21 @@ jobs:
1616
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13"]
1717

1818
steps:
19-
- uses: actions/checkout@v4
19+
- uses: actions/checkout@v6
2020
- name: Set up Python ${{ matrix.python-version }}
21-
uses: actions/setup-python@v5
21+
uses: actions/setup-python@v6
2222
with:
2323
python-version: ${{ matrix.python-version }}
24+
25+
- name: Install uv
26+
uses: astral-sh/setup-uv@v7
27+
with:
28+
enable-cache: true
29+
2430
- name: Install dependencies
25-
run: |
26-
python -m pip install --upgrade pip
27-
pip install -r requirements.txt
31+
run: uv sync --all-groups
32+
2833
- name: Run tests
29-
run: pytest
34+
run: uv run pytest
3035
env:
31-
IPINFO_TOKEN: ${{ secrets.IPINFO_TOKEN }}
36+
IPINFO_TOKEN: ${{ secrets.IPINFO_TOKEN }}

0 commit comments

Comments
 (0)