From 44466581702db202c50069ddaa94ef3677d9a219 Mon Sep 17 00:00:00 2001 From: gooker_young Date: Fri, 3 Jul 2026 07:50:59 +0800 Subject: [PATCH] =?UTF-8?q?ci(github=20workflows):=20=E4=BC=98=E5=8C=96CI/?= =?UTF-8?q?CD=E6=B5=81=E7=A8=8B=EF=BC=8C=E4=BD=BF=E7=94=A8=E8=87=AA?= =?UTF-8?q?=E5=AE=9A=E4=B9=89=E5=AE=B9=E5=99=A8=E5=B9=B6=E7=AE=80=E5=8C=96?= =?UTF-8?q?=E6=AD=A5=E9=AA=A4?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit 1. 为CI和release任务添加自定义pyflowx-ci容器并配置UV链接模式 2. 移除冗余的setup-uv和setup-python步骤,合并依赖同步、代码检查命令 3. 简化步骤命名和执行逻辑,统一使用uv管理工具链 --- .github/workflows/ci.yml | 26 +++++++++++++------------- .github/workflows/release.yml | 20 ++++++++------------ 2 files changed, 21 insertions(+), 25 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 94e924b..f2d714b 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -12,21 +12,21 @@ jobs: ci: name: Lint, Typecheck & Test runs-on: ubuntu-latest + container: + image: pyflowx-ci:latest + env: + UV_LINK_MODE: copy steps: - uses: http://gitea:3000/zhou/checkout.git@main - - uses: http://gitea:3000/zhou/setup-uv.git@v8.1.0 - with: - uv-version: "0.11.26" - enable-cache: true + - name: Sync dependencies + run: uv sync --frozen || uv sync - - uses: http://gitea:3000/zhou/setup-python.git@v6 - with: - python-version: | - 3.8 - 3.13 + - name: Ruff check + run: ruff check src tests - - run: uv sync - - run: uv run ruff check src tests - - run: uv run pyrefly check . - - run: uvx tox run -e py38,py313 + - name: Pyrefly check + run: pyrefly check . + + - name: Tox test (py38, py313) + run: uvx tox run -e py38,py313 diff --git a/.github/workflows/release.yml b/.github/workflows/release.yml index 5a89425..e512771 100644 --- a/.github/workflows/release.yml +++ b/.github/workflows/release.yml @@ -11,20 +11,18 @@ jobs: release: name: Build, Publish & Release runs-on: ubuntu-latest + container: + image: pyflowx-ci:latest + env: + UV_LINK_MODE: copy steps: - uses: http://gitea:3000/zhou/checkout.git@v4 - - uses: http://gitea:3000/zhou/setup-uv.git@v8.1.0 - with: - enable-cache: true + - name: Build distributions + run: uv build - - uses: http://gitea:3000/zhou/setup-python.git@v6 - with: - python-version: '3.13' - - - run: uv build - - - uses: http://gitea:3000/zhou/gh-action-pypi-publish.git@release/v1 + - name: Publish to PyPI + uses: http://gitea:3000/zhou/gh-action-pypi-publish.git@release/v1 with: password: ${{ secrets.PYPI_API_TOKEN }} @@ -43,5 +41,3 @@ jobs: -H "Content-Type: application/octet-stream" \ --data-binary @"$file" done - env: - GITEA_URL: ${{ secrets.GITEA_URL || 'https://git.gookeryoung.cn' }}