[CI] Install apt dependencies when running "pyright: Run test cases" (#13976)

This commit is contained in:
Sebastian Rittau
2025-05-09 19:31:03 +02:00
committed by GitHub
parent 5e2e68683b
commit 785c9c4688
2 changed files with 27 additions and 0 deletions
+7
View File
@@ -103,6 +103,13 @@ jobs:
- 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: |
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
+20
View File
@@ -0,0 +1,20 @@
#!/usr/bin/env python3
import itertools
import os
import sys
from ts_utils.metadata import read_metadata
from ts_utils.paths import STUBS_PATH
if __name__ == "__main__":
distributions = sys.argv[1:]
if not distributions:
distributions = os.listdir(STUBS_PATH)
dependencies = set(
itertools.chain.from_iterable(
read_metadata(distribution).stubtest_settings.apt_dependencies for distribution in distributions
)
)
for dependency in sorted(dependencies):
print(dependency)