2929
3030jobs :
3131 stubtest-stdlib :
32- name : Check stdlib with stubtest
33- if : ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch ' }}
32+ name : " stubtest: stdlib"
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"]
38+ python-version : ["3.9", "3.10", "3.11", "3.12", "3.13", "3.14" ]
3939 fail-fast : false
4040
4141 steps :
42- - uses : actions/checkout@v4
42+ - uses : actions/checkout@v5
4343 - name : Set up Python ${{ matrix.python-version }} on ${{ matrix.os }}
44- uses : actions/setup-python@v5
44+ uses : actions/setup-python@v6
4545 with :
4646 python-version : ${{ matrix.python-version }}
4747 cache : pip
@@ -54,68 +54,78 @@ jobs:
5454 run : python tests/stubtest_stdlib.py
5555
5656 stubtest-third-party :
57- name : Check third party stubs with stubtest
58- if : ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch ' }}
57+ name : " stubtest: third party"
58+ if : ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule ' }}
5959 runs-on : ${{ matrix.os }}
6060 strategy :
6161 matrix :
6262 os : ["ubuntu-latest", "windows-latest", "macos-latest"]
6363 shard-index : [0, 1, 2, 3]
6464 fail-fast : false
6565 steps :
66- - uses : actions/checkout@v4
67- - uses : actions/setup-python@v5
66+ - uses : actions/checkout@v5
67+ - uses : actions/setup-python@v6
6868 with :
69- python-version : " 3.12 "
69+ python-version : " 3.13 "
7070 cache : pip
7171 cache-dependency-path : |
7272 requirements-tests.txt
7373 stubs/**/METADATA.toml
7474 - name : Install dependencies
7575 run : pip install -r requirements-tests.txt
76- - name : Run stubtest
76+ - name : Install required system packages
7777 shell : bash
7878 run : |
7979 PACKAGES=$(python tests/get_stubtest_system_requirements.py)
8080
8181 if [ "${{ runner.os }}" = "Linux" ]; then
8282 if [ -n "$PACKAGES" ]; then
83- sudo apt-get update && sudo apt-get install -y $PACKAGES
83+ printf "Installing APT packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
84+ sudo apt-get update -q && sudo apt-get install -qy $PACKAGES
8485 fi
85-
86- PYTHON_EXECUTABLE="xvfb-run python"
8786 else
8887 if [ "${{ runner.os }}" = "macOS" ] && [ -n "$PACKAGES" ]; then
88+ printf "Installing Homebrew packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
8989 brew install -q $PACKAGES
9090 fi
9191
9292 if [ "${{ runner.os }}" = "Windows" ] && [ -n "$PACKAGES" ]; then
93+ printf "Installing Chocolatey packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n"
9394 choco install -y $PACKAGES
9495 fi
95-
96+ fi
97+ - name : Run stubtest
98+ shell : bash
99+ run : |
100+ if [ "${{ runner.os }}" = "Linux" ]; then
101+ PYTHON_EXECUTABLE="xvfb-run python"
102+ else
96103 PYTHON_EXECUTABLE="python"
97104 fi
98105
99- $PYTHON_EXECUTABLE tests/stubtest_third_party.py --specified -platforms-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
106+ $PYTHON_EXECUTABLE tests/stubtest_third_party.py --ci -platforms-only --num-shards 4 --shard-index ${{ matrix.shard-index }}
100107
101108 stub-uploader :
102- name : Run the stub_uploader tests
103- if : ${{ github.repository == 'python/typeshed' || github.event_name == 'workflow_dispatch ' }}
109+ name : stub_uploader tests
110+ if : ${{ github.repository == 'python/typeshed' || github.event_name != 'schedule ' }}
104111 runs-on : ubuntu-latest
105112 steps :
106113 - name : Checkout typeshed
107- uses : actions/checkout@v4
114+ uses : actions/checkout@v5
108115 with :
109116 path : typeshed
110117 - name : Checkout stub_uploader
111- uses : actions/checkout@v4
118+ uses : actions/checkout@v5
112119 with :
113120 repository : typeshed-internal/stub_uploader
114121 path : stub_uploader
115- - uses : actions/setup-python@v5
122+ - uses : actions/setup-python@v6
123+ with :
124+ # Keep in sync with stub_uploader's check_scripts.yml workflow.
125+ python-version : " 3.13"
126+ - uses : astral-sh/setup-uv@v6
116127 with :
117- python-version : " 3.12"
118- - uses : astral-sh/setup-uv@v5
128+ version-file : " typeshed/requirements-tests.txt"
119129 - name : Run tests
120130 run : |
121131 cd stub_uploader
@@ -124,14 +134,14 @@ jobs:
124134
125135 # https://github.community/t/run-github-actions-job-only-if-previous-job-has-failed/174786/2
126136 create-issue-on-failure :
127- name : Create an issue if daily tests failed
137+ name : Create issue on failure
128138 runs-on : ubuntu-latest
129139 needs : [stubtest-stdlib, stubtest-third-party, stub-uploader]
130140 if : ${{ github.repository == 'python/typeshed' && always() && github.event_name == 'schedule' && (needs.stubtest-stdlib.result == 'failure' || needs.stubtest-third-party.result == 'failure' || needs.stub-uploader.result == 'failure') }}
131141 permissions :
132142 issues : write
133143 steps :
134- - uses : actions/github-script@v7
144+ - uses : actions/github-script@v8
135145 with :
136146 github-token : ${{ secrets.GITHUB_TOKEN }}
137147 script : |
0 commit comments