mirror of
https://github.com/suyiiyii/nonebot-bison.git
synced 2025-06-02 09:26:12 +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
|
description: Python version
|
||||||
required: false
|
required: false
|
||||||
default: "3.10"
|
default: "3.10"
|
||||||
|
install-deps:
|
||||||
|
description: Install dependencies
|
||||||
|
required: false
|
||||||
|
default: false
|
||||||
|
|
||||||
runs:
|
runs:
|
||||||
using: "composite"
|
using: "composite"
|
||||||
@ -20,3 +24,7 @@ runs:
|
|||||||
with:
|
with:
|
||||||
version: "latest"
|
version: "latest"
|
||||||
enable-cache: true
|
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/**
|
- nonebot_bison/**
|
||||||
- tests/**
|
- tests/**
|
||||||
- pyproject.toml
|
- pyproject.toml
|
||||||
- poetry.lock
|
- uv.lock
|
||||||
- docker.env.prod
|
- docker.env.prod
|
||||||
- .github/**
|
- .github/**
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -21,7 +21,7 @@ on:
|
|||||||
- nonebot_bison/**
|
- nonebot_bison/**
|
||||||
- tests/**
|
- tests/**
|
||||||
- pyproject.toml
|
- pyproject.toml
|
||||||
- poetry.lock
|
- uv.lock
|
||||||
- docker.env.prod
|
- docker.env.prod
|
||||||
- .github/**
|
- .github/**
|
||||||
types:
|
types:
|
||||||
@ -72,12 +72,10 @@ jobs:
|
|||||||
uses: ./.github/actions/setup-python
|
uses: ./.github/actions/setup-python
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
install-deps: "true"
|
||||||
- name: Install prerequisites
|
|
||||||
run: poetry install
|
|
||||||
|
|
||||||
- name: Run Pytest
|
- 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
|
- name: Upload coverage report
|
||||||
uses: codecov/codecov-action@v5
|
uses: codecov/codecov-action@v5
|
||||||
@ -106,12 +104,10 @@ jobs:
|
|||||||
uses: ./.github/actions/setup-python
|
uses: ./.github/actions/setup-python
|
||||||
with:
|
with:
|
||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
install-deps: true
|
||||||
- name: Install prerequisites
|
|
||||||
run: poetry install
|
|
||||||
|
|
||||||
- name: Run Pytest
|
- 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
|
- name: Upload coverage report
|
||||||
uses: codecov/codecov-action@v5
|
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/**
|
- nonebot_bison/**
|
||||||
- tests/**
|
- tests/**
|
||||||
- pyproject.toml
|
- pyproject.toml
|
||||||
- poetry.lock
|
- uv.lock
|
||||||
- docker.env.prod
|
- docker.env.prod
|
||||||
- .github/**
|
- .github/**
|
||||||
pull_request:
|
pull_request:
|
||||||
@ -21,7 +21,7 @@ on:
|
|||||||
- nonebot_bison/**
|
- nonebot_bison/**
|
||||||
- tests/**
|
- tests/**
|
||||||
- pyproject.toml
|
- pyproject.toml
|
||||||
- poetry.lock
|
- uv.lock
|
||||||
- docker.env.prod
|
- docker.env.prod
|
||||||
- .github/**
|
- .github/**
|
||||||
types:
|
types:
|
||||||
@ -55,7 +55,7 @@ jobs:
|
|||||||
python-version: ${{ matrix.python-version }}
|
python-version: ${{ matrix.python-version }}
|
||||||
|
|
||||||
- name: Install prerequisites
|
- name: Install prerequisites
|
||||||
run: poetry add pydantic@^1.10 && poetry install
|
run: uv add pydantic==1.10 && uv sync --frozen
|
||||||
|
|
||||||
- name: Run Pytest
|
- 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
|
- name: Setup Python environment
|
||||||
uses: ./.github/actions/setup-python
|
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
|
- name: Archive Changelog
|
||||||
uses: docker://ghcr.io/nonebot/auto-changelog:master
|
uses: docker://ghcr.io/nonebot/auto-changelog:master
|
||||||
@ -30,6 +30,6 @@ jobs:
|
|||||||
git config user.name github-actions[bot]
|
git config user.name github-actions[bot]
|
||||||
git config user.email github-actions[bot]@users.noreply.github.com
|
git config user.email github-actions[bot]@users.noreply.github.com
|
||||||
git add .
|
git add .
|
||||||
git commit -m ":bookmark: Release $(poetry version -s)"
|
git commit -m ":bookmark: Release ${{ env.TAG_NAME }}"
|
||||||
git tag ${{ env.TAG_NAME }}
|
git tag ${{ env.TAG_NAME }}
|
||||||
git push && git push --tags
|
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
|
- name: Publish PyPI and Github
|
||||||
run: |
|
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/*
|
gh release upload --clobber ${{ env.TAG_NAME }} dist/*
|
||||||
env:
|
env:
|
||||||
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
|
||||||
|
Loading…
x
Reference in New Issue
Block a user