3030jobs :
3131 stubtest-stdlib :
3232 name : " stubtest: stdlib"
33- if : ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch ' }}
33+ if : ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule ' }}
3434 runs-on : ${{ matrix.os }}
3535 strategy :
3636 matrix :
3737 os : ["ubuntu-latest", "windows-latest", "macos-latest"]
38- python-version : ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14-dev"]
38+ python-version : ["3.10", "3.11", "3.12", "3.13", "3.14", "3.15"]
39+ exclude :
40+ # https://github.com/python/typeshed/issues/15694
41+ - os : " windows-latest"
42+ python-version : " 3.10"
3943 fail-fast : false
4044
4145 steps :
42- - uses : actions/checkout@v4
46+ - uses : actions/checkout@v7
4347 - name : Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
44- uses : actions/setup-python@v5
48+ uses : actions/setup-python@v6
4549 with :
4650 python-version : ${{ matrix.python-version }}
4751 cache : pip
@@ -55,16 +59,16 @@ jobs:
5559
5660 stubtest-third-party :
5761 name : " stubtest: third party"
58- if : ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch ' }}
62+ if : ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule ' }}
5963 runs-on : ${{ matrix.os }}
6064 strategy :
6165 matrix :
6266 os : ["ubuntu-latest", "windows-latest", "macos-latest"]
6367 shard-index : [0, 1, 2, 3]
6468 fail-fast : false
6569 steps :
66- - uses : actions/checkout@v4
67- - uses : actions/setup-python@v5
70+ - uses : actions/checkout@v7
71+ - uses : actions/setup-python@v6
6872 with :
6973 python-version : " 3.13"
7074 cache : pip
@@ -73,55 +77,60 @@ jobs:
7377 stubs/**/METADATA.toml
7478 - name : Install dependencies
7579 run : pip install -r requirements-tests.txt
76- - name : Run stubtest
80+ - name : Install required system packages
7781 shell : bash
7882 run : |
7983 PACKAGES=$(python tests/get_stubtest_system_requirements.py)
8084
8185 if [ "${{ runner.os }}" = "Linux" ]; then
8286 if [ -n "$PACKAGES" ]; then
87+ printf "Installing APT packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
8388 sudo apt-get update -q && sudo apt-get install -qy $PACKAGES
8489 fi
85-
86- PYTHON_EXECUTABLE="xvfb-run python"
8790 else
8891 if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
92+ printf "Installing Homebrew packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
8993 brew install -q $PACKAGES
9094 fi
9195
9296 if [ "${{ runner.os }}" = "Windows" ] && [ -n "$PACKAGES" ]; then
97+ printf "Installing Chocolatey packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
9398 choco install -y $PACKAGES
9499 fi
95-
100+ fi
101+ - name : Run stubtest
102+ shell : bash
103+ run : |
104+ if [ "${{ runner.os }}" = "Linux" ]; then
105+ PYTHON_EXECUTABLE="xvfb-run python"
106+ else
96107 PYTHON_EXECUTABLE="python"
97108 fi
98109
99- $PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified -platforms-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
110+ $PYTHON_EXECUTABLE tests/stubtest_third_party.py --ci -platforms-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
100111
101112 stub-uploader :
102113 name : stub_uploader tests
103- if : ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch ' }}
114+ if : ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule ' }}
104115 runs-on : ubuntu-latest
105116 steps :
106117 - name : Checkout typeshed
107- uses : actions/checkout@v4
118+ uses : actions/checkout@v7
108119 with :
109120 path : typeshed
110121 - name : Checkout stub_uploader
111- uses : actions/checkout@v4
122+ uses : actions/checkout@v7
112123 with :
113124 repository : typeshed-internal/stub_uploader
114125 path : stub_uploader
115- - uses : actions /setup-python@v5
126+ - uses : astral-sh /setup-uv@v8.2.0
116127 with :
117- # Keep in sync with stub_uploader's check_scripts.yml workflow.
118- python-version : " 3.13"
119- - uses : astral-sh/setup-uv@v5
128+ version-file : " typeshed/requirements-tests.txt"
120129 - name : Run tests
121130 run : |
122131 cd stub_uploader
123- uv pip install -r requirements.txt --system
124- python -m pytest tests
132+ # Keep Python version in sync with stub_uploader's check_scripts.yml workflow.
133+ uv run -- python=3.13 --no-project --with-requirements=requirements.txt -m pytest tests
125134
126135 # https://github.community/t/run-github-actions-job-only-if-previous-job-has-failed/174786/2
127136 create-issue-on-failure :
@@ -132,7 +141,7 @@ jobs:
132141 permissions :
133142 issues : write
134143 steps :
135- - uses : actions/github-script@v7
144+ - uses : actions/github-script@v9
136145 with :
137146 github-token : ${{ secrets.GITHUB_TOKEN }}
138147 script : |
0 commit comments