/
niceSOFT
/
python3-typing-extensions
Обзор
Документация
Войти
/
niceSOFT
/
python3-typing-extensions
Код
Задачи
Вики
Пакеты
0
Релизы
0
Аналитика
Безопасность
main
.github/workflows/third_party.yml
417 строк
15 KB
Sebastian Rittau
Use full versions in GitHub action comments (#778)
02 июл 2026, 20:02
Не верифицирован
02 июл 2026, 20:02
c461223
Код
Авторство
О чём код?
# This workflow is a daily cron job, # running the tests of various third-party libraries that use us. # This helps us spot regressions early, # and helps flag when third-party libraries are making incorrect assumptions # that might cause them to break when we cut a new release. name: Third-party tests on: schedule: - cron: "30 2 * * *" # 02:30 UTC pull_request: paths: - ".github/workflows/third_party.yml" workflow_dispatch: permissions: contents: read env: PIP_DISABLE_PIP_VERSION_CHECK: 1 FORCE_COLOR: 1 concurrency: group: ${{ github.workflow }}-${{ github.head_ref || github.run_id }} cancel-in-progress: true jobs: skip-schedule-on-fork: name: Check for schedule trigger on fork runs-on: ubuntu-latest # if 'schedule' was the trigger, # don't run it on contributors' forks if: >- github.repository == 'python/typing_extensions' || github.event_name != 'schedule' steps: - run: "true" pydantic: name: pydantic tests needs: skip-schedule-on-fork strategy: fail-fast: false matrix: # PyPy is deliberately omitted here, # since pydantic's tests intermittently segfault on PyPy, # and it's nothing to do with typing_extensions # Tests on 3.14 don't pass as of 2 November 2025 python-version: ["3.10", "3.11", "3.12", "3.13"] runs-on: ubuntu-latest timeout-minutes: 60 steps: - name: Install the latest version of uv uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: python-version: ${{ matrix.python-version }} - name: Checkout pydantic run: git clone --depth=1 https://github.com/pydantic/pydantic.git || git clone --depth=1 https://github.com/pydantic/pydantic.git - name: Checkout typing_extensions uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: path: typing-extensions-latest persist-credentials: false - name: Run tests with typing_extensions main branch working-directory: pydantic run: | uv add --editable ../typing-extensions-latest uv sync --all-packages --group testing-extra --all-extras printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" uv pip list printf "\n\n" uv run pytest typing_inspect: name: typing_inspect tests needs: skip-schedule-on-fork strategy: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] runs-on: ubuntu-latest timeout-minutes: 60 steps: - name: Install the latest version of uv uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: python-version: ${{ matrix.python-version }} - name: Checkout typing_inspect run: git clone --depth=1 https://github.com/ilevkivskyi/typing_inspect.git || git clone --depth=1 https://github.com/ilevkivskyi/typing_inspect.git - name: Checkout typing_extensions uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: path: typing-extensions-latest persist-credentials: false - name: Run tests with typing_extensions main branch working-directory: typing_inspect run: | set -x uv venv .venv uv pip install -r test-requirements.txt --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" uv pip install -e "typing-extensions @ ../typing-extensions-latest" printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" uv pip list uv run --no-project pytest pycroscope: name: pycroscope tests needs: skip-schedule-on-fork strategy: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] runs-on: ubuntu-latest timeout-minutes: 60 steps: - name: Install the latest version of uv uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: python-version: ${{ matrix.python-version }} - name: Check out pycroscope run: git clone --depth=1 https://github.com/JelleZijlstra/pycroscope.git || git clone --depth=1 https://github.com/JelleZijlstra/pycroscope.git - name: Checkout typing_extensions uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: path: typing-extensions-latest persist-credentials: false - name: Run tests with typing_extensions main branch working-directory: pycroscope run: | set -x uv venv .venv uv pip install -e 'pycroscope[tests] @ .' --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" uv pip install -e "typing-extensions @ ../typing-extensions-latest" printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" uv pip list uv run --no-project pytest pycroscope/ typeguard: name: typeguard tests needs: skip-schedule-on-fork strategy: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] runs-on: ubuntu-latest timeout-minutes: 60 steps: - name: Install the latest version of uv uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: python-version: ${{ matrix.python-version }} - name: Check out typeguard run: git clone --depth=1 https://github.com/agronholm/typeguard.git || git clone --depth=1 https://github.com/agronholm/typeguard.git - name: Checkout typing_extensions uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: path: typing-extensions-latest persist-credentials: false - name: Run tests with typing_extensions main branch env: PYTHON_COLORS: 0 # A test fails if tracebacks are colorized working-directory: typeguard run: | set -x uv venv .venv uv pip install -e "typeguard @ ." --group test --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" uv pip install -e "typing-extensions @ ../typing-extensions-latest" printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" uv pip list uv run --no-project pytest typed-argument-parser: name: typed-argument-parser tests needs: skip-schedule-on-fork strategy: fail-fast: false matrix: # 3.9 is no longer supported. 3.14 fails some tests as of 2 November 2025 python-version: ["3.10", "3.11", "3.12", "3.13"] runs-on: ubuntu-latest timeout-minutes: 60 steps: - name: Install the latest version of uv uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: python-version: ${{ matrix.python-version }} - name: Check out typed-argument-parser run: git clone --depth=1 https://github.com/swansonk14/typed-argument-parser.git || git clone --depth=1 https://github.com/swansonk14/typed-argument-parser.git - name: Checkout typing_extensions uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: path: typing-extensions-latest persist-credentials: false - name: Configure git for typed-argument-parser tests # typed-argument parser does this in their CI, # and the tests fail unless we do this run: | git config --global user.email "you@example.com" git config --global user.name "Your Name" - name: Run tests with typing_extensions main branch working-directory: typed-argument-parser run: | set -x uv venv .venv uv pip install -e "typed-argument-parser @ ." --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" uv pip install pytest --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" uv pip install -e "typing-extensions @ ../typing-extensions-latest" printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" uv pip list uv run --no-project pytest mypy: name: stubtest & mypyc tests needs: skip-schedule-on-fork strategy: fail-fast: false matrix: # 3.14 fails a test as of 2 November 2025 python-version: ["3.10", "3.11", "3.12", "3.13"] runs-on: ubuntu-latest timeout-minutes: 60 steps: - name: Install the latest version of uv uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: python-version: ${{ matrix.python-version }} - name: Checkout mypy for stubtest and mypyc tests run: git clone --depth=1 https://github.com/python/mypy.git || git clone --depth=1 https://github.com/python/mypy.git - name: Checkout typing_extensions uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: path: typing-extensions-latest persist-credentials: false - name: Run tests with typing_extensions main branch working-directory: mypy run: | set -x uv venv .venv uv pip install -r test-requirements.txt --exclude-newer "$(git show -s --date=format:'%Y-%m-%dT%H:%M:%SZ' --format=%cd HEAD)" uv pip install -e . uv pip install -e "typing_extensions @ ../typing-extensions-latest" printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" uv pip list uv run --no-project pytest -n 2 ./mypy/test/teststubtest.py ./mypyc/test/test_run.py ./mypyc/test/test_external.py cattrs: name: cattrs tests needs: skip-schedule-on-fork strategy: fail-fast: false matrix: python-version: ["3.10", "3.11", "3.12", "3.13", "3.14"] runs-on: ubuntu-latest timeout-minutes: 60 steps: - name: Install the latest version of uv uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: python-version: ${{ matrix.python-version }} - name: Checkout cattrs run: git clone --depth=1 https://github.com/python-attrs/cattrs.git || git clone --depth=1 https://github.com/python-attrs/cattrs.git - name: Checkout typing_extensions uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: path: typing-extensions-latest persist-credentials: false - name: Run tests with typing_extensions main branch working-directory: cattrs run: | uv add --editable ../typing-extensions-latest uv sync --group test --all-extras printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" uv pip list printf "\n\n" uv run pytest tests sqlalchemy: name: sqlalchemy tests needs: skip-schedule-on-fork strategy: fail-fast: false matrix: # PyPy is deliberately omitted here, since SQLAlchemy's tests # fail on PyPy for reasons unrelated to typing_extensions. python-version: [ "3.10", "3.11", "3.12", "3.13", "3.14" ] checkout-ref: [ "main", "rel_2_0" ] # sqlalchemy tests fail when using the Ubuntu 24.04 runner # https://github.com/sqlalchemy/sqlalchemy/commit/8d73205f352e68c6603e90494494ef21027ec68f runs-on: ubuntu-22.04 timeout-minutes: 60 steps: - name: Install the latest version of uv uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: python-version: ${{ matrix.python-version }} - name: Checkout sqlalchemy run: git clone -b ${{ matrix.checkout-ref }} --depth=1 https://github.com/sqlalchemy/sqlalchemy.git || git clone -b ${{ matrix.checkout-ref }} --depth=1 https://github.com/sqlalchemy/sqlalchemy.git - name: Checkout typing_extensions uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: path: typing-extensions-latest persist-credentials: false - name: Run sqlalchemy tests with typing_extensions main branch working-directory: sqlalchemy run: | set -x # TODO: Remove pytest==9.0.3 pin. SQLAlchemy tests fail when using pytest 9.1.0. See #764. uvx \ --with=setuptools \ tox -e github-nocext --override "testenv:github-nocext.deps+=pytest==9.0.3" --force-dep="typing-extensions @ file://$(pwd)/../typing-extensions-latest" -- -q --nomemory --notimingintensive litestar: name: litestar tests needs: skip-schedule-on-fork runs-on: ubuntu-latest timeout-minutes: 10 strategy: fail-fast: false matrix: # As of 2 November 2025 a dependency is missing 3.14 wheels python-version: [ "3.11", "3.12", "3.13" ] steps: - name: Install the latest version of uv uses: astral-sh/setup-uv@fac544c07dec837d0ccb6301d7b5580bf5edae39 # v8.2.0 with: python-version: ${{ matrix.python-version }} - name: Checkout litestar run: git clone --depth=1 https://github.com/litestar-org/litestar.git || git clone --depth=1 https://github.com/litestar-org/litestar.git - name: Checkout typing_extensions uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: path: typing-extensions-latest persist-credentials: false - name: Run litestar tests with typing_extensions main branch working-directory: litestar run: | # litestar's python-requires means uv won't let us add typing-extensions-latest # as a requirement unless we do this sed -i 's/^requires-python = ">=3.8/requires-python = ">=3.10/' pyproject.toml uv add --editable ../typing-extensions-latest uv sync printf "\n\nINSTALLED DEPENDENCIES ARE:\n\n" uv pip list printf "\n\n" uv run python -m pytest tests/unit/test_typing.py tests/unit/test_dto create-issue-on-failure: name: Create an issue if daily tests failed runs-on: ubuntu-latest needs: - pydantic - typing_inspect - pycroscope - typeguard - typed-argument-parser - mypy - cattrs - sqlalchemy - litestar if: >- ${{ github.repository == 'python/typing_extensions' && always() && github.event_name == 'schedule' && ( needs.pydantic.result == 'failure' || needs.typing_inspect.result == 'failure' || needs.pycroscope.result == 'failure' || needs.typeguard.result == 'failure' || needs.typed-argument-parser.result == 'failure' || needs.mypy.result == 'failure' || needs.cattrs.result == 'failure' || needs.sqlalchemy.result == 'failure' || needs.litestar.result == 'failure' ) }} permissions: issues: write steps: - uses: actions/github-script@3a2844b7e9c422d3c10d287c895573f7108da1b3 # v9.0.0 with: github-token: ${{ secrets.GITHUB_TOKEN }} script: | await github.rest.issues.create({ owner: "python", repo: "typing_extensions", title: `Third-party tests failed on ${new Date().toDateString()}`, body: "Run listed here: ${{ github.server_url }}/${{ github.repository }}/actions/runs/${{ github.run_id }}", })