Repository navigation
chore: release 2.28.0 #109
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: Consumer corpus | |
| # The suite in `tests/` imports the source tree. This installs a build instead and checks code written | |
| # the way a consumer writes it: a plain pytest suite, a fully annotated one at maximum strictness, the | |
| # numpy/pandas stack, containers of somebody else's making, and the deliberately dynamic parts. | |
| # | |
| # It exists because the last several typing defects were found by guessing at other people's code | |
| # rather than by running it: a selector type that refused a mapping with its own `__getitem__`, a | |
| # `slice` that stopped type-checking on 3.10, an unparameterised `Matcher` that made every member | |
| # "partially unknown" under pyright strict. Each was invisible from inside the repository. | |
| # | |
| # One project is not about the typed surface at all: the pytest plugin has no API to call, and its | |
| # hooks, ini options and xdist transport had never run from an installed wheel until it existed. | |
| # | |
| # Not in the main gate: it builds the package and creates one environment per project, which takes | |
| # minutes rather than seconds. It runs on a schedule, on demand, and on anything touching the package | |
| # or its packaging, which is where its findings come from. | |
| on: | |
| # the whole package, rather than the files that looked relevant: this corpus reads *behaviour* from an | |
| # installed wheel, and what produces a diff or a report reaches back through the engine, the snapshot | |
| # machinery and the polling. A hand-kept list of those was already wrong twice, once for the module | |
| # that records late polls and once for the ones that build the diff a section prints | |
| push: | |
| paths: | |
| - "assertpy2/**" | |
| - "pyproject.toml" | |
| - "corpus/**" | |
| - ".github/workflows/corpus.yml" | |
| pull_request: | |
| paths: | |
| - "assertpy2/**" | |
| - "pyproject.toml" | |
| - "corpus/**" | |
| - ".github/workflows/corpus.yml" | |
| schedule: | |
| - cron: "0 5 * * 2" # weekly, Tuesday 05:00 UTC | |
| workflow_dispatch: {} | |
| permissions: | |
| contents: read | |
| concurrency: | |
| group: corpus-${{ github.ref }} | |
| cancel-in-progress: true | |
| jobs: | |
| corpus: | |
| timeout-minutes: 25 | |
| runs-on: ${{ matrix.os }} | |
| strategy: | |
| fail-fast: false | |
| matrix: | |
| # both ends of the supported range, because two findings so far were version-dependent: a | |
| # `slice` is unhashable before 3.12, and stub differences move what a checker accepts | |
| include: | |
| - os: ubuntu-latest | |
| python: "3.10" | |
| install: wheel | |
| - os: ubuntu-latest | |
| python: "3.15" | |
| install: wheel | |
| - os: ubuntu-latest | |
| python: "3.14" | |
| install: sdist | |
| - os: windows-latest | |
| python: "3.14" | |
| install: wheel | |
| steps: | |
| - uses: actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1 | |
| with: | |
| persist-credentials: false | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@c18668ad3cf93ea998bef934396af7bb5c839dc7 # v10.2.0 | |
| # the runner itself needs 3.11 or later for `tomllib`; the version under test is the one the | |
| # consumer environments are built on, which is what `--python` selects | |
| - name: Set up Python | |
| uses: actions/setup-python@5fda3b95a4ea91299a34e894583c3862153e4b97 # v7.0.0 | |
| with: | |
| python-version: "3.13" | |
| - name: Run the corpus | |
| run: > | |
| python corpus/run.py | |
| --from ${{ matrix.install }} | |
| --python ${{ matrix.python }} | |
| --json corpus-results.json | |
| - name: Publish the results | |
| if: always() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1 | |
| with: | |
| name: corpus-${{ matrix.os }}-${{ matrix.python }}-${{ matrix.install }} | |
| path: corpus-results.json | |
| if-no-files-found: ignore |