2 Commits

Author SHA1 Message Date
zhou 5293831165 Merge pull request 'feat(cli/dev/envdev): 为Linux环境添加Docker安装配置相关任务' (#1) from develop into main
CI / Lint & Typecheck (push) Failing after 30s
CI / Test (ubuntu-latest) (push) Failing after 30s
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
Reviewed-on: #1
2026-07-02 05:26:08 +00:00
zhou 87606d152a feat(cli/dev/envdev): 为Linux环境添加Docker安装配置相关任务
CI / Lint & Typecheck (push) Failing after 6m4s
CI / Test (ubuntu-latest) (push) Failing after 1m31s
CI / Test (macos-latest) (push) Has been cancelled
CI / Test (windows-latest) (push) Has been cancelled
新增Linux系统下安装docker-compose-v2、添加用户到docker组以及刷新docker用户组的任务流程,完善开发环境配置步骤
2026-07-02 10:58:12 +08:00
3 changed files with 66 additions and 35 deletions
+27 -9
View File
@@ -9,24 +9,42 @@ concurrency:
cancel-in-progress: true
jobs:
ci:
name: Lint, Typecheck & Test
lint-and-typecheck:
name: Lint & Typecheck
runs-on: ubuntu-latest
steps:
- uses: http://gitea:3000/zhou/checkout.git@main
- uses: actions/checkout@v4
- uses: http://gitea:3000/zhou/setup-uv.git@v8.1.0
- uses: astral-sh/setup-uv@v5
with:
uv-version: "0.5.21" # 或 "0.6.0" 等你需要的版本
enable-cache: true
- uses: http://gitea:3000/zhou/setup-python.git@v6
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: uv sync
- run: uv run ruff check src tests
- run: uv run pyrefly check .
test:
name: Test (${{ matrix.os }})
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, windows-latest, macos-latest]
steps:
- uses: actions/checkout@v4
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- uses: actions/setup-python@v5
with:
python-version: |
3.8
3.13
- run: uv sync
- run: uv run ruff check src tests
- run: uv run pyrefly check .
- run: uvx tox run -e py38,py313
+39 -25
View File
@@ -6,42 +6,56 @@ on:
permissions:
contents: write
id-token: write
jobs:
release:
name: Build, Publish & Release
build:
runs-on: ubuntu-latest
outputs:
version: ${{ steps.version.outputs.version }}
steps:
- uses: http://gitea:3000/zhou/checkout.git@v4
- uses: actions/checkout@v4
- uses: http://gitea:3000/zhou/setup-uv.git@v8.1.0
- uses: astral-sh/setup-uv@v5
with:
enable-cache: true
- uses: http://gitea:3000/zhou/setup-python.git@v6
- uses: actions/setup-python@v5
with:
python-version: '3.13'
- run: uv build
- uses: http://gitea:3000/zhou/gh-action-pypi-publish.git@release/v1
with:
password: ${{ secrets.PYPI_API_TOKEN }}
- id: version
run: echo "version=${GITHUB_REF#refs/tags/v}" >> $GITHUB_OUTPUT
- name: Create Gitea Release
run: |
VERSION=${GITHUB_REF#refs/tags/v}
REPO=${GITHUB_REPOSITORY}
UPLOAD_URL=$(curl -s -X POST "https://git.gookeryoung.cn/api/v1/repos/${REPO}/releases" \
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: application/json" \
-d "{\"tag_name\": \"v${VERSION}\", \"name\": \"v${VERSION}\", \"draft\": false, \"prerelease\": false}" \
| jq -r '.upload_url')
for file in dist/*; do
curl -s -X POST "${UPLOAD_URL}?name=$(basename $file)" \
-H "Authorization: token ${{ secrets.GITEA_TOKEN }}" \
-H "Content-Type: application/octet-stream" \
--data-binary @"$file"
done
env:
GITEA_URL: ${{ secrets.GITEA_URL || 'https://git.gookeryoung.cn' }}
- uses: actions/upload-artifact@v7
with:
name: dist
path: dist/
publish-pypi:
needs: build
runs-on: ubuntu-latest
environment: pypi
steps:
- uses: actions/download-artifact@v8
with:
name: dist
path: dist
- uses: pypa/gh-action-pypi-publish@release/v1
release:
needs: [build, publish-pypi]
runs-on: ubuntu-latest
steps:
- uses: actions/download-artifact@v8
with:
name: dist
path: dist
- uses: softprops/action-gh-release@v2
with:
files: dist/*
generate_release_notes: true
-1
View File
@@ -1 +0,0 @@
required-version = ">=0.5.0"