e073ff41ee
1. 合并lint和typecheck任务为一个job,减少重复的环境配置步骤 2. 精简测试矩阵,只保留Python3.8和3.13两个版本 3. 移除不必要的覆盖率上传和聚合检查job 4. 简化工作流触发条件,只保留push和手动触发
51 lines
999 B
YAML
51 lines
999 B
YAML
name: CI
|
|
|
|
on:
|
|
push:
|
|
branches: [ main, develop ]
|
|
|
|
concurrency:
|
|
group: ${{ github.workflow }}-${{ github.ref }}
|
|
cancel-in-progress: true
|
|
|
|
jobs:
|
|
lint-and-typecheck:
|
|
name: Lint & Typecheck
|
|
runs-on: ubuntu-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.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: uvx tox run -e py38,py313
|