Repository navigation
docs: record pole-python CI evidence #28
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: 持续集成 | |
| on: | |
| push: | |
| pull_request: | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| name: Python ${{ matrix.python }} | |
| runs-on: ubuntu-latest | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python: ["3.9", "3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - name: 检出代码 | |
| uses: actions/checkout@v6 | |
| - name: 配置 Python | |
| uses: actions/setup-python@v6 | |
| with: | |
| python-version: ${{ matrix.python }} | |
| cache: pip | |
| cache-dependency-path: packages/pole-client-python/pyproject.toml | |
| - name: 安装项目与构建工具 | |
| run: | | |
| python -m pip install --upgrade pip | |
| python -m pip install './packages/pole-client-python[dev]' | |
| - name: 执行测试 | |
| run: >- | |
| PYTHONPATH=packages/pole-client-python/src | |
| python -m unittest discover -s packages/pole-client-python/tests -v | |
| - name: 检查字节码编译 | |
| run: >- | |
| python -m compileall -q | |
| packages/pole-client-python/src packages/pole-client-python/tests | |
| - name: 构建发布包 | |
| run: >- | |
| python -m build | |
| --outdir packages/pole-client-python/dist | |
| packages/pole-client-python |