Skip to content

[docutils] Add parsers.commonmark_wrapper #31750

[docutils] Add parsers.commonmark_wrapper

[docutils] Add parsers.commonmark_wrapper #31750

Workflow file for this run

name: Test
on:
workflow_dispatch:
push:
branches:
- main
pull_request:
paths-ignore:
- "**/*.md"
- "scripts/**"
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:
typeshed-structure:
name: Check typeshed structure
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install -r requirements-tests.txt --system
- run: python ./tests/check_typeshed_structure.py
pytype:
name: "pytype: Check stubs"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# Max supported Python version as of pytype 2024.10.11
python-version: "3.12"
- uses: astral-sh/setup-uv@v6
- run: uv pip install -r requirements-tests.txt --system
- name: Install external dependencies for 3rd-party stubs
run: |
DEPENDENCIES=$( python tests/get_external_stub_requirements.py )
if [ -n "$DEPENDENCIES" ]; then
printf "Installing packages:\n $(echo $DEPENDENCIES | sed 's/ /\n /g')\n"
uv pip install --system $DEPENDENCIES
fi
- run: uv pip freeze
- run: ./tests/pytype_test.py --print-stderr
mypy:
name: "mypy: Check stubs"
runs-on: ubuntu-latest
strategy:
matrix:
platform: ["linux", "win32", "darwin"]
# TODO (2025-05-10) "3.13.2" should be "3.14-dev", see below.
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.13.2"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: ${{ matrix.python-version }}
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install -r requirements-tests.txt --system
- name: Install required APT packages
run: |
sudo apt-get update -qy
DEPENDENCIES=$( python tests/get_external_apt_dependencies.py )
if [ -n "$DEPENDENCIES" ]; then
printf "Installing APT packages:\n $(echo $DEPENDENCIES | sed 's/ /\n /g')\n"
sudo apt-get install -qy $DEPENDENCIES
fi
- name: Run mypy_test.py
run: |
# TODO: (2025-05-10) This is a bad hack to work around mypy crashing
# when running on Python 3.14. See https://github.com/python/mypy/pull/19020.
if [[ "${{ matrix.python-version }}" == "3.13.2" ]]; then
MYPY_PY_VERSION="3.14"
else
# python-version can sometimes be pinned to a specific version or to "-dev", but
# mypy understands only X.Y version numbers.
MYPY_PY_VERSION=$(echo ${{ matrix.python-version }} | cut -d - -f 1 | cut -d . -f 1-2)
fi
python ./tests/mypy_test.py --platform=${{ matrix.platform }} --python-version=${MYPY_PY_VERSION}
regression-tests:
name: "mypy: Run test cases"
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
# Use py311 for now, as py312 seems to be around 30s slower in CI
# TODO: figure out why that is (#11590)
python-version: "3.11"
- run: curl -LsSf https://astral.sh/uv/install.sh | sh
- run: uv pip install -r requirements-tests.txt --system
- run: python ./tests/regr_test.py --all --verbosity QUIET
pyright:
name: "pyright: Run test cases"
runs-on: ubuntu-latest
strategy:
matrix:
python-platform: ["Linux", "Windows", "Darwin"]
python-version: ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14"]
fail-fast: false
steps:
- uses: actions/checkout@v4
- uses: actions/setup-python@v5
with:
python-version: "3.13"
- uses: astral-sh/setup-uv@v6
- name: Install typeshed test-suite requirements
# Install these so we can run `get_external_stub_requirements.py`
run: uv pip install -r requirements-tests.txt --system
- name: Install required APT packages
run: |
sudo apt-get update -qy
DEPENDENCIES=$( python tests/get_external_apt_dependencies.py )
if [ -n "$DEPENDENCIES" ]; then
printf "Installing APT packages:\n $(echo $DEPENDENCIES | sed 's/ /\n /g')\n"
sudo apt-get install -qy $DEPENDENCIES
fi
- name: Create an isolated venv for testing
run: uv venv .venv
- name: Install 3rd-party stub dependencies
run: |
DEPENDENCIES=$( python tests/get_external_stub_requirements.py )
if [ -n "$DEPENDENCIES" ]; then
printf "Installing packages:\n $(echo $DEPENDENCIES | sed 's/ /\n /g')\n"
uv pip install --python-version ${{ matrix.python-version }} $DEPENDENCIES
fi
- name: Activate the isolated venv for the rest of the job
run: echo "$PWD/.venv/bin" >> $GITHUB_PATH
- name: List 3rd-party stub dependencies installed
run: uv pip freeze
- name: Run pyright with basic settings on all the stubs
uses: jakebailey/pyright-action@v2
with:
version: PATH
python-platform: ${{ matrix.python-platform }}
python-version: ${{ matrix.python-version }}
annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
- name: Run pyright with stricter settings on some of the stubs
uses: jakebailey/pyright-action@v2
with:
version: PATH
python-platform: ${{ matrix.python-platform }}
python-version: ${{ matrix.python-version }}
annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
project: ./pyrightconfig.stricter.json
- name: Run pyright on the test cases
uses: jakebailey/pyright-action@v2
with:
version: PATH
python-platform: ${{ matrix.python-platform }}
python-version: ${{ matrix.python-version }}
annotate: ${{ matrix.python-version == '3.13' && matrix.python-platform == 'Linux' }} # Having each job create the same comment is too noisy.
project: ./pyrightconfig.testcases.json
stub-uploader:
name: stub_uploader tests
runs-on: ubuntu-latest
steps:
- name: Checkout typeshed
uses: actions/checkout@v4
with:
path: typeshed
- name: Checkout stub_uploader
uses: actions/checkout@v4
with:
repository: typeshed-internal/stub_uploader
path: stub_uploader
- uses: actions/setup-python@v5
with:
# Keep in sync with stub_uploader's check_scripts.yml workflow.
python-version: "3.13"
- uses: astral-sh/setup-uv@v6
- name: Run tests
run: |
cd stub_uploader
uv pip install -r requirements.txt --system
python -m pytest tests
pFad - Phonifier reborn

Pfad - The Proxy pFad of © 2024 Garber Painting. All rights reserved.

Note: This service is not intended for secure transactions such as banking, social media, email, or purchasing. Use at your own risk. We assume no liability whatsoever for broken pages.


Alternative Proxies:

Alternative Proxy

pFad Proxy

pFad v3 Proxy

pFad v4 Proxy