mirror of
https://github.com/davidhalter/typeshed.git
synced 2025-12-07 20:54:28 +08:00
Cross-platform third-party stubs requirements install script (#13482)
This commit is contained in:
14
.github/workflows/tests.yml
vendored
14
.github/workflows/tests.yml
vendored
@@ -47,11 +47,10 @@ jobs:
|
||||
- run: uv pip install -r requirements-tests.txt --system
|
||||
- name: Install external dependencies for 3rd-party stubs
|
||||
run: |
|
||||
mapfile -t DEPENDENCIES < <( python tests/get_external_stub_requirements.py )
|
||||
DEPENDENCIES=$( python tests/get_external_stub_requirements.py )
|
||||
if [ -n "$DEPENDENCIES" ]; then
|
||||
echo "Installing packages:"
|
||||
for DEP in "${DEPENDENCIES[@]}"; do echo " ${DEP}"; done
|
||||
uv pip install "${DEPENDENCIES[@]}" --system
|
||||
printf "Installing packages:\n $(echo $DEPENDENCIES | sed 's/ /\n /g')\n"
|
||||
uv pip install --system $DEPENDENCIES
|
||||
fi
|
||||
- run: uv pip freeze
|
||||
- run: ./tests/pytype_test.py --print-stderr
|
||||
@@ -108,14 +107,13 @@ jobs:
|
||||
run: uv venv .venv
|
||||
- name: Install 3rd-party stub dependencies
|
||||
run: |
|
||||
mapfile -t DEPENDENCIES < <( python tests/get_external_stub_requirements.py )
|
||||
DEPENDENCIES=$( python tests/get_external_stub_requirements.py )
|
||||
if [ -n "$DEPENDENCIES" ]; then
|
||||
echo "Installing packages:"
|
||||
for DEP in "${DEPENDENCIES[@]}"; do echo " ${DEP}"; done
|
||||
printf "Installing packages:\n $(echo $DEPENDENCIES | sed 's/ /\n /g')\n"
|
||||
# TODO: We need to specify the platform here, but the platforms
|
||||
# strings supported by uv are different from the ones supported by
|
||||
# pyright.
|
||||
uv pip install --python-version ${{ matrix.python-version }} "${DEPENDENCIES[@]}"
|
||||
uv pip install --python-version ${{ matrix.python-version }} $DEPENDENCIES
|
||||
fi
|
||||
- name: Activate the isolated venv for the rest of the job
|
||||
run: echo "$PWD/.venv/bin" >> $GITHUB_PATH
|
||||
|
||||
Reference in New Issue
Block a user