mirror of
https://github.com/davidhalter/typeshed.git
synced 2026-05-04 20:45:49 +08:00
[CI] Install apt dependencies when running "pyright: Run test cases" (#13976)
This commit is contained in:
@@ -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
|
||||
|
||||
Executable
+20
@@ -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)
|
||||
Reference in New Issue
Block a user