fix: 修复向stderr输出时,无控制台的exe程序无法运行 #14
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: CI | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| paths: | |
| - "src/**" | |
| - "tests/**" | |
| - "pyproject.toml" | |
| - ".github/workflows/**" | |
| jobs: | |
| ruff: | |
| name: Ruff | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: "3.11" | |
| version: latest | |
| - name: Ruff check | |
| run: uvx ruff check --output-format=github . | |
| - name: Ruff format check | |
| run: uvx ruff format --check . | |
| basedpyright: | |
| name: BasedPyright | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: "3.11" | |
| version: "latest" | |
| - name: Install Dependencies | |
| run: uv sync | |
| - name: Static typing check | |
| run: uvx basedpyright | |
| test: | |
| name: Coverage | |
| runs-on: windows-latest | |
| permissions: | |
| id-token: write | |
| contents: read | |
| concurrency: | |
| # group: test-coverage-${{ github.ref }}-${{ matrix.python-version }}-${{ matrix.os }} | |
| group: coverage-${{ github.ref }}-${{ matrix.python-version }} | |
| cancel-in-progress: true | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| python-version: ["3.11", "3.12", "3.13"] | |
| # os: [ubuntu-latest, windows-latest, macos-latest] | |
| # pydantic-version: ["v1", "v2"] | |
| env: | |
| # OS: ${{ matrix.os }} | |
| PYTHON: ${{ matrix.python-version }} | |
| UV_NO_SYNC: 1 | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Setup uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| enable-cache: true | |
| python-version: ${{ matrix.python-version }} | |
| version: latest | |
| - name: Install Dependencies | |
| run: uv sync | |
| - name: Run Pytest | |
| run: uv run pytest --cov=src --cov-report xml --junitxml=./junit.xml -n auto | |
| - name: Upload test results to Codecov | |
| if: ${{ !cancelled() }} | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| env_vars: PYTHON | |
| use_oidc: true | |
| report_type: test_results | |
| - name: Upload coverage to Codecov | |
| uses: codecov/codecov-action@v5 | |
| with: | |
| env_vars: PYTHON | |
| use_oidc: true |