Use setup-uv instead of setup-python in CI
actions/setup-python only ships binaries for Ubuntu releases, so it fails on the Debian-based Gitea act_runner image. setup-uv installs portable Python builds that work on any glibc Linux. Co-Authored-By: Claude Opus 5.5 <noreply@anthropic.com>
This commit is contained in:
co-authored by
Claude Opus 5.5
parent
38f3a0da2f
commit
5d7d03a0a6
@@ -26,12 +26,13 @@ jobs:
|
|||||||
fetch-depth: 0
|
fetch-depth: 0
|
||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
uses: actions/setup-python@v5
|
uses: astral-sh/setup-uv@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.13"
|
python-version: "3.13"
|
||||||
|
activate-environment: true
|
||||||
|
|
||||||
- name: Install package
|
- name: Install package
|
||||||
run: pip install -e ".[dev]"
|
run: uv pip install -e ".[dev]"
|
||||||
|
|
||||||
- name: Run tests
|
- name: Run tests
|
||||||
run: pytest
|
run: pytest
|
||||||
@@ -155,16 +156,17 @@ jobs:
|
|||||||
|
|
||||||
- name: Set up Python
|
- name: Set up Python
|
||||||
if: env.PYPI_TOKEN != ''
|
if: env.PYPI_TOKEN != ''
|
||||||
uses: actions/setup-python@v5
|
uses: astral-sh/setup-uv@v6
|
||||||
with:
|
with:
|
||||||
python-version: "3.13"
|
python-version: "3.13"
|
||||||
|
activate-environment: true
|
||||||
|
|
||||||
- name: Build distributions
|
- name: Build distributions
|
||||||
if: env.PYPI_TOKEN != ''
|
if: env.PYPI_TOKEN != ''
|
||||||
env:
|
env:
|
||||||
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ needs.build.outputs.version }}
|
SETUPTOOLS_SCM_PRETEND_VERSION: ${{ needs.build.outputs.version }}
|
||||||
run: |
|
run: |
|
||||||
pip install build twine
|
uv pip install build twine
|
||||||
python -m build
|
python -m build
|
||||||
twine check dist/*
|
twine check dist/*
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user