Skip to content

Commit 785c9c4

Browse files
authored
[CI] Install apt dependencies when running "pyright: Run test cases" (#13976)
1 parent 5e2e686 commit 785c9c4

File tree

2 files changed

+27
-0
lines changed

2 files changed

+27
-0
lines changed

.github/workflows/tests.yml

+7
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,13 @@ jobs:
103103
- name: Install typeshed test-suite requirements
104104
# Install these so we can run `get_external_stub_requirements.py`
105105
run: uv pip install -r requirements-tests.txt --system
106+
- name: Install required APT packages
107+
run: |
108+
DEPENDENCIES=$( python tests/get_external_apt_dependencies.py )
109+
if [ -n "$DEPENDENCIES" ]; then
110+
printf "Installing APT packages:\n $(echo $DEPENDENCIES | sed 's/ /\n /g')\n"
111+
sudo apt-get install -qy $DEPENDENCIES
112+
fi
106113
- name: Create an isolated venv for testing
107114
run: uv venv .venv
108115
- name: Install 3rd-party stub dependencies
+20
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,20 @@
1+
#!/usr/bin/env python3
2+
3+
import itertools
4+
import os
5+
import sys
6+
7+
from ts_utils.metadata import read_metadata
8+
from ts_utils.paths import STUBS_PATH
9+
10+
if __name__ == "__main__":
11+
distributions = sys.argv[1:]
12+
if not distributions:
13+
distributions = os.listdir(STUBS_PATH)
14+
dependencies = set(
15+
itertools.chain.from_iterable(
16+
read_metadata(distribution).stubtest_settings.apt_dependencies for distribution in distributions
17+
)
18+
)
19+
for dependency in sorted(dependencies):
20+
print(dependency)

0 commit comments

Comments
 (0)