mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-05-31 16:16:11 +08:00
♻️ 将所有 poetry 替换为 uv
This commit is contained in:
parent
6c8b37f085
commit
08c8bb955f
8
.github/actions/setup-python/action.yml
vendored
8
.github/actions/setup-python/action.yml
vendored
@ -6,6 +6,10 @@ inputs:
|
||||
description: Python version
|
||||
required: false
|
||||
default: "3.10"
|
||||
install-deps:
|
||||
description: Install dependencies
|
||||
required: false
|
||||
default: false
|
||||
|
||||
runs:
|
||||
using: "composite"
|
||||
@ -20,3 +24,7 @@ runs:
|
||||
with:
|
||||
version: "latest"
|
||||
enable-cache: true
|
||||
|
||||
- name: Install dependencies
|
||||
if: ${{ inputs.install-deps == true }}
|
||||
run: uv sync --frozen
|
||||
|
16
.github/workflows/main.yml
vendored
16
.github/workflows/main.yml
vendored
@ -11,7 +11,7 @@ on:
|
||||
- nonebot_bison/**
|
||||
- tests/**
|
||||
- pyproject.toml
|
||||
- poetry.lock
|
||||
- uv.lock
|
||||
- docker.env.prod
|
||||
- .github/**
|
||||
pull_request:
|
||||
@ -21,7 +21,7 @@ on:
|
||||
- nonebot_bison/**
|
||||
- tests/**
|
||||
- pyproject.toml
|
||||
- poetry.lock
|
||||
- uv.lock
|
||||
- docker.env.prod
|
||||
- .github/**
|
||||
types:
|
||||
@ -72,12 +72,10 @@ jobs:
|
||||
uses: ./.github/actions/setup-python
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install prerequisites
|
||||
run: poetry install
|
||||
install-deps: "true"
|
||||
|
||||
- name: Run Pytest
|
||||
run: poetry run pytest --cov-report xml --cov=./nonebot_bison -k 'not compare and not render' -n auto
|
||||
run: uv run pytest --cov-report xml --cov=./nonebot_bison -k 'not compare and not render' -n auto
|
||||
|
||||
- name: Upload coverage report
|
||||
uses: codecov/codecov-action@v5
|
||||
@ -106,12 +104,10 @@ jobs:
|
||||
uses: ./.github/actions/setup-python
|
||||
with:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install prerequisites
|
||||
run: poetry install
|
||||
install-deps: true
|
||||
|
||||
- name: Run Pytest
|
||||
run: poetry run pytest --cov-report xml --cov=./nonebot_bison -k 'not compare' -n auto
|
||||
run: uv run pytest --cov-report xml --cov=./nonebot_bison -k 'not compare' -n auto
|
||||
|
||||
- name: Upload coverage report
|
||||
uses: codecov/codecov-action@v5
|
||||
|
8
.github/workflows/pyd1-compat.yml
vendored
8
.github/workflows/pyd1-compat.yml
vendored
@ -11,7 +11,7 @@ on:
|
||||
- nonebot_bison/**
|
||||
- tests/**
|
||||
- pyproject.toml
|
||||
- poetry.lock
|
||||
- uv.lock
|
||||
- docker.env.prod
|
||||
- .github/**
|
||||
pull_request:
|
||||
@ -21,7 +21,7 @@ on:
|
||||
- nonebot_bison/**
|
||||
- tests/**
|
||||
- pyproject.toml
|
||||
- poetry.lock
|
||||
- uv.lock
|
||||
- docker.env.prod
|
||||
- .github/**
|
||||
types:
|
||||
@ -55,7 +55,7 @@ jobs:
|
||||
python-version: ${{ matrix.python-version }}
|
||||
|
||||
- name: Install prerequisites
|
||||
run: poetry add pydantic@^1.10 && poetry install
|
||||
run: uv add pydantic==1.10 && uv sync --frozen
|
||||
|
||||
- name: Run Pytest
|
||||
run: poetry run pytest -k 'not compare and not render' -n auto
|
||||
run: uv run pytest -k 'not compare and not render' -n auto
|
||||
|
4
.github/workflows/release-trigger.yml
vendored
4
.github/workflows/release-trigger.yml
vendored
@ -16,7 +16,7 @@ jobs:
|
||||
- name: Setup Python environment
|
||||
uses: ./.github/actions/setup-python
|
||||
|
||||
- run: echo "TAG_NAME=v$(poetry version -s)" >> $GITHUB_ENV
|
||||
- run: echo "TAG_NAME=v$(uvx --from=toml-cli toml get --toml-path=pyproject.toml project.version)" >> $GITHUB_ENV
|
||||
|
||||
- name: Archive Changelog
|
||||
uses: docker://ghcr.io/nonebot/auto-changelog:master
|
||||
@ -30,6 +30,6 @@ jobs:
|
||||
git config user.name github-actions[bot]
|
||||
git config user.email github-actions[bot]@users.noreply.github.com
|
||||
git add .
|
||||
git commit -m ":bookmark: Release $(poetry version -s)"
|
||||
git commit -m ":bookmark: Release ${{ env.TAG_NAME }}"
|
||||
git tag ${{ env.TAG_NAME }}
|
||||
git push && git push --tags
|
||||
|
2
.github/workflows/release.yml
vendored
2
.github/workflows/release.yml
vendored
@ -54,7 +54,7 @@ jobs:
|
||||
|
||||
- name: Publish PyPI and Github
|
||||
run: |
|
||||
poetry publish --build -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} || echo "Already pushed to pypi"
|
||||
uv publish --build -u ${{ secrets.PYPI_USERNAME }} -p ${{ secrets.PYPI_PASSWORD }} || echo "Already pushed to pypi"
|
||||
gh release upload --clobber ${{ env.TAG_NAME }} dist/*
|
||||
env:
|
||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||
|
Loading…
x
Reference in New Issue
Block a user