feat: Replace Poetry with uv for dependency management in CI workflow

This commit is contained in:
2026-04-12 22:02:15 +08:00
parent 9dc1795f9f
commit da3a193836
+8 -12
View File
@@ -29,24 +29,20 @@ jobs:
with:
python-version: "3.13.1"
- name: Install Poetry
uses: snok/install-poetry@v1
with:
virtualenvs-create: true
virtualenvs-in-project: false
virtualenvs-path: /opt/venv
- name: Install uv
uses: astral-sh/setup-uv@v3
- name: Load cached venv
id: cached-poetry-dependencies
id: cached-uv-dependencies
uses: actions/cache@v4
with:
path: /opt/venv
key: venv-${{ runner.os }}-python-3.13.1-${{ hashFiles('poetry.lock') }}
path: .venv
key: venv-${{ runner.os }}-python-3.13.1-${{ hashFiles('pyproject.toml', 'uv.lock') }}
- name: Install dependencies and actiavte virtualenv
if: steps.cached-poetry-dependencies.outputs.cache-hit != 'true'
- name: Install dependencies
run: |
poetry install --no-interaction --no-root
uv sync --all-extras
- name: Run tests
env:
@@ -54,4 +50,4 @@ jobs:
DATABASE__HOSTNAME: localhost
DATABASE__PASSWORD: postgres
run: |
poetry run pytest
uv run pytest