fix: not_ to return a Callable not an object #202
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: CI | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| branches: [main] | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} | |
| cancel-in-progress: true | |
| permissions: | |
| contents: read | |
| jobs: | |
| test: | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| matrix: | |
| os: [ubuntu-latest] | |
| python-version: ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"] | |
| include: | |
| # the Codecov cell also installs every optional integration (pandas/polars/numpy extras plus | |
| # pydantic/attrs/requests), so the tests the other minimal-env cells skip run here for real | |
| - os: ubuntu-latest | |
| python-version: "3.14" | |
| full-deps: true | |
| - os: windows-latest | |
| python-version: "3.14" | |
| - os: macos-latest | |
| python-version: "3.14" | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | |
| - name: Set up Python ${{ matrix.python-version }} | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: ${{ matrix.python-version }} | |
| allow-prereleases: true | |
| - name: Install dependencies | |
| if: '!matrix.full-deps' | |
| run: uv sync --extra json | |
| - name: Install dependencies (all integrations) | |
| if: matrix.full-deps | |
| run: uv sync --extra json --extra data --extra inline --group integrations --group docs-examples | |
| - name: Test with coverage | |
| if: '!matrix.full-deps' | |
| run: uv run pytest -v --cov=assertpy2 --cov-report=term-missing --cov-report=xml --ignore=tests/test_docs_examples.py tests | |
| - name: Test with coverage (enforce 100%) | |
| # Only the full-deps cell has every integration installed and 0 skips, so it is | |
| # the only cell that can reach 100%. This is the hard local gate; Codecov's status | |
| # is reporting on top, not the sole guard (it uploads async and can fail open). | |
| # The doc-example guard is excluded here so its runs never pad the coverage number. | |
| if: matrix.full-deps | |
| run: uv run pytest -v --cov=assertpy2 --cov-report=term-missing --cov-report=xml --cov-fail-under=100 --ignore=tests/test_docs_examples.py tests | |
| - name: Guard doc examples | |
| # Runs once (docs are platform-independent) and without coverage, so executing the | |
| # README/guide snippets can't mask a real coverage gap in the test suite. | |
| if: matrix.full-deps | |
| run: uv run pytest tests/test_docs_examples.py | |
| - name: Upload coverage to Codecov | |
| if: matrix.python-version == '3.14' && matrix.os == 'ubuntu-latest' | |
| uses: codecov/codecov-action@fb8b3582c8e4def4969c97caa2f19720cb33a72f # v7.0.0 | |
| with: | |
| token: ${{ secrets.CODECOV_TOKEN }} | |
| files: coverage.xml | |
| lint: | |
| runs-on: ubuntu-latest | |
| steps: | |
| - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@11f9893b081a58869d3b5fccaea48c9e9e46f990 # v8.3.2 | |
| - name: Set up Python | |
| uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 | |
| with: | |
| python-version: "3.14" | |
| - name: Install dependencies | |
| run: uv sync --extra json --extra inline --group typecheck | |
| - name: Ruff check | |
| run: uv run ruff check . | |
| - name: Ruff format check | |
| run: uv run ruff format --check . | |
| - name: Type check (ty) | |
| run: uv run ty check assertpy2/ tests/test_typing.py | |
| - name: Type check (mypy --strict, public typing surface) | |
| run: uv run mypy --strict --follow-imports=silent tests/test_typing.py | |
| - name: Type check (pyright, public typing surface) | |
| run: uv run pyright tests/test_typing.py | |
| ci-ok: | |
| needs: [test, lint] | |
| if: always() | |
| runs-on: ubuntu-latest | |
| steps: | |
| - name: Verify required jobs succeeded | |
| env: | |
| TEST_RESULT: ${{ needs.test.result }} | |
| LINT_RESULT: ${{ needs.lint.result }} | |
| run: '[ "$TEST_RESULT" = "success" ] && [ "$LINT_RESULT" = "success" ]' |