Skip to content

chore: 完成项目收尾,清理冗余文档和更新配置 #47

chore: 完成项目收尾,清理冗余文档和更新配置

chore: 完成项目收尾,清理冗余文档和更新配置 #47

Workflow file for this run

name: CI
on:
push:
branches: [master, main]
workflow_dispatch:
permissions:
contents: read
concurrency:
group: ci-${{ github.ref }}
cancel-in-progress: true
jobs:
quality:
name: Quality checks
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
- name: Black
run: python -m black --check src/ main.py tests/
- name: isort
run: python -m isort --check-only src/ main.py tests/
- name: Flake8
run: python -m flake8 src/ main.py --max-line-length=120 --count --select=E9,F63,F7,F82 --show-source --statistics
- name: Runtime path baseline
run: python -m pytest -q tests/test_runtime_paths.py
tests:
name: Tests (Python ${{ matrix.python-version }})
needs: quality
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
python-version: ["3.10", "3.12"]
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
cache: pip
- name: Install dependencies
run: |
python -m pip install --upgrade pip
python -m pip install ".[dev]"
- name: Run test suite
run: python -m pytest -q
build:
name: Build package
needs: quality
runs-on: ubuntu-latest
steps:
- name: Checkout
uses: actions/checkout@v4
- name: Set up Python
uses: actions/setup-python@v5
with:
python-version: "3.12"
- name: Install build dependencies
run: |
python -m pip install --upgrade pip
python -m pip install build twine
- name: Build
run: python -m build
- name: Check package metadata
run: python -m twine check dist/*
- name: Verify installed CLI
run: |
python -m pip install dist/*.whl
cleanbook --version
python -c "import src.resources; print('packaged resources OK')"