Python testing #323
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: Python testing | |
| on: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| create: | |
| jobs: | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: "3.13" | |
| - name: Install dependencies | |
| run: uv sync --dev | |
| - name: lint with ruff | |
| run: | | |
| uv run ruff format tdclient --diff --exit-non-zero-on-fix | |
| uv run ruff check tdclient | |
| - name: Run pyright | |
| run: uv run pyright tdclient | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| max-parallel: 4 | |
| matrix: | |
| os: [ubuntu-latest, windows-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] | |
| steps: | |
| - uses: actions/checkout@v6 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@v7 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install dependencies | |
| run: uv sync --extra test | |
| - name: Run test | |
| run: | | |
| uv run coverage run --source=tdclient -m pytest tdclient/test | |
| # | |
| # Disable coverage submission to avoid | |
| # coveralls.exception.CoverallsException: Could not submit coverage: 422 Client Error: Unprocessable Entity for url: https://coveralls.io/api/v1/jobs | |
| # | |
| # - name: Submit to coveralls | |
| # run: coveralls | |
| # env: | |
| # COVERALLS_REPO_TOKEN: ${{ secrets.GITHUB_TOKEN }} |