build(deps-dev): bump pytest from 8.3.4 to 9.0.3 #41
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: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| pull_request: | |
| branches: | |
| - main | |
| concurrency: | |
| group: pr-${{ github.head_ref || github.sha }} | |
| cancel-in-progress: true | |
| jobs: | |
| lint: | |
| name: Lint (ruff) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Configure Poetry | |
| run: poetry config virtualenvs.in-project true | |
| - name: Cache virtualenv | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-lint-${{ runner.os }}-3.10-${{ hashFiles('poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install --with dev | |
| - name: Run ruff check | |
| run: poetry run ruff check . | |
| - name: Run ruff format check | |
| run: poetry run ruff format --check . | |
| typecheck: | |
| name: Type check (pyright) | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Configure Poetry | |
| run: poetry config virtualenvs.in-project true | |
| - name: Cache virtualenv | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-typecheck-${{ runner.os }}-3.10-${{ hashFiles('poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install --with dev | |
| - name: Run pyright | |
| run: poetry run pyright | |
| build: | |
| name: Build package | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: "3.10" | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Configure Poetry | |
| run: poetry config virtualenvs.in-project true | |
| - name: Cache virtualenv | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-build-${{ runner.os }}-3.10-${{ hashFiles('poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install --only main | |
| - name: Build package | |
| run: poetry build | |
| - name: Check package | |
| run: | | |
| python -m pip install --upgrade twine | |
| twine check dist/* | |
| tests: | |
| name: Tests (Python ${{ matrix.python-version }}, ${{ matrix.os }}) | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| os: [ubuntu-latest, windows-latest, macos-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13"] | |
| steps: | |
| - uses: actions/checkout@v4 | |
| - name: Set up Python | |
| uses: actions/setup-python@v5 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| - name: Install Poetry | |
| run: pipx install poetry | |
| - name: Configure Poetry | |
| run: poetry config virtualenvs.in-project true | |
| - name: Cache virtualenv | |
| uses: actions/cache@v4 | |
| with: | |
| path: .venv | |
| key: venv-tests-${{ runner.os }}-${{ matrix.python-version }}-${{ hashFiles('poetry.lock') }} | |
| - name: Install dependencies | |
| run: poetry install | |
| - name: Run unit tests | |
| run: poetry run pytest tests/ -v |