docs: 添加Buff系统重构方案文档 #293
Workflow file for this run
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: pytest | |
| on: | |
| push: | |
| branches: [main, dev/*] # 触发分支 | |
| tags: ["v*"] | |
| pull_request: | |
| branches: [main, dev/*] | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest, macos-latest, windows-latest] | |
| python-version: ["3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 # 检出代码 | |
| - name: Set up Python | |
| uses: actions/setup-python@v4 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install uv | |
| run: | | |
| if [ "${{ runner.os }}" == "Windows" ]; then | |
| powershell -ExecutionPolicy ByPass -c "irm https://astral.sh/uv/install.ps1 | iex" | |
| else | |
| curl -LsSf https://astral.sh/uv/install.sh | sh | |
| fi | |
| shell: bash | |
| - name: Setup uv cache | |
| uses: actions/cache@v4 | |
| with: | |
| path: | | |
| ~/.cache/uv | |
| ~/AppData/Local/uv/cache | |
| key: ${{ runner.os }}-uv-${{ hashFiles('uv.lock', 'pyproject.toml')}} | |
| restore-keys: | | |
| ${{ runner.os }}-uv- | |
| - name: Install dependencies with uv | |
| run: | | |
| uv sync -v | |
| - name: Run tests with pytest | |
| run: uv run pytest -v --cov=zsim --cov-report=html | |
| - name: Upload coverage report | |
| uses: actions/upload-artifact@v4 | |
| with: | |
| name: coverage-report-html-${{ matrix.os }} | |
| path: htmlcov |