diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 81bb087d..ba170d9f 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -69,15 +69,45 @@ jobs: - name: Run tox tests run: tox -e default - - name: Install project testing extras (ensure pytest-asyncio present) + + test-without-cli-extras: + # tox installs the cli extra, so the job above never exercises an + # install without click or rich. release.yml installs + # -e ".[testing]", which has neither, and a test module importing + # click above its ImportError guard failed there and nowhere else, + # after the release tag was already pushed. This job runs the + # release workflow's install so that failure surfaces on the pull + # request instead. + name: Test without CLI extras + runs-on: ubuntu-latest + + steps: + - uses: actions/checkout@v4 + + - name: Set up Python + uses: actions/setup-python@v5 + with: + python-version: '3.14' + + - name: Install project with testing extras only run: | python -m pip install --upgrade pip - python -m pip install '.[testing]' + python -m pip install -e ".[testing]" + + - name: Verify the CLI extras really are absent + run: | + if python -c 'import click' 2>/dev/null; then + echo "click is installed; this job no longer tests what it claims to" + exit 1 + fi + + - name: Run tests + run: python -m pytest build: name: Build Distribution runs-on: ubuntu-latest - needs: [lint, test] + needs: [lint, test, test-without-cli-extras] steps: - uses: actions/checkout@v4