Make the default PyPI surface resolve to the supported 2.0 line #5
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: PyPI project surface | |
| on: | |
| push: | |
| branches: [main] | |
| paths: | |
| - '.github/workflows/pypi-project-surface.yml' | |
| - 'README.md' | |
| - 'pyproject.toml' | |
| - 'scripts/check_pypi_project_surface.py' | |
| - 'scripts/check_release_metadata.py' | |
| - 'tests/test_pypi_project_surface.py' | |
| - 'tests/test_release_metadata.py' | |
| schedule: | |
| - cron: '17 7 * * 1' | |
| workflow_dispatch: | |
| permissions: | |
| contents: read | |
| jobs: | |
| audit: | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@d23441a48e516b6c34aea4fa41551a30e30af803 # v6 | |
| with: | |
| fetch-depth: 0 | |
| persist-credentials: false | |
| - uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6 | |
| with: | |
| python-version: "3.12" | |
| - name: Install local qualification dependencies | |
| if: github.event_name == 'push' | |
| run: pip install -e '.[dev]' | |
| - name: Test the project-surface audit implementation | |
| if: github.event_name == 'push' | |
| run: pytest tests/test_pypi_project_surface.py tests/test_release_metadata.py -q | |
| - name: Validate current source metadata without querying PyPI | |
| if: github.event_name == 'push' | |
| run: python scripts/check_pypi_project_surface.py --source-ref HEAD --source-only | |
| - name: Resolve the newest immutable Python release-candidate source | |
| if: github.event_name != 'push' | |
| run: | | |
| set -euo pipefail | |
| source_ref="$(git tag -l '2.0.0-rc.*' --sort=-version:refname | head -n 1)" | |
| if [ -z "$source_ref" ]; then | |
| printf 'no Python release-candidate tag is available for public qualification\n' >&2 | |
| exit 1 | |
| fi | |
| printf 'source_ref=%s\n' "$source_ref" >> "$GITHUB_ENV" | |
| - name: Qualify authoritative root metadata and package resolution | |
| if: github.event_name != 'push' | |
| run: >- | |
| python scripts/check_pypi_project_surface.py | |
| --source-ref "$source_ref" | |
| --attempts 3 | |
| --interval-seconds 10 | |
| --evidence pypi-project-surface-evidence.json | |
| - name: Upload project-surface evidence | |
| if: github.event_name != 'push' | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: pypi-project-surface-evidence | |
| path: pypi-project-surface-evidence.json |