|
64 | 64 | run: | |
65 | 65 | PACKAGES=$(python tests/get_stubtest_system_requirements.py) |
66 | 66 | if [ -n "$PACKAGES" ]; then |
67 | | - printf "Installing APT packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n" |
68 | | - sudo apt-get update -q && sudo apt-get install -qy $PACKAGES |
| 67 | + PACKAGE_ARGS=() |
| 68 | + while IFS= read -r package; do |
| 69 | + PACKAGE_ARGS+=("$package") |
| 70 | + done <<< "$PACKAGES" |
| 71 | + printf 'Installing APT packages:\n' |
| 72 | + printf ' %s\n' "${PACKAGE_ARGS[@]}" |
| 73 | + sudo apt-get update -q && sudo apt-get install -qy "${PACKAGE_ARGS[@]}" |
69 | 74 | fi |
70 | 75 | - name: Run mypy_test.py |
71 | 76 | run: python ./tests/mypy_test.py --platform=${{ matrix.platform }} --python-version=${{ matrix.python-version }} |
@@ -117,7 +122,11 @@ jobs: |
117 | 122 | run: | |
118 | 123 | PACKAGES=$(python tests/get_external_stub_requirements.py) |
119 | 124 | if [ -n "$PACKAGES" ]; then |
120 | | - uv pip install --python-version ${{ matrix.python-version }} $PACKAGES |
| 125 | + PACKAGE_ARGS=() |
| 126 | + while IFS= read -r package; do |
| 127 | + PACKAGE_ARGS+=("$package") |
| 128 | + done <<< "$PACKAGES" |
| 129 | + uv pip install --python-version ${{ matrix.python-version }} "${PACKAGE_ARGS[@]}" |
121 | 130 | fi |
122 | 131 | # Published stub packages can shadow the checked-in stubs when ty |
123 | 132 | # resolves their relative imports. |
@@ -152,7 +161,11 @@ jobs: |
152 | 161 | run: | |
153 | 162 | PACKAGES=$(python tests/get_external_stub_requirements.py) |
154 | 163 | if [ -n "$PACKAGES" ]; then |
155 | | - uv pip install --python-version ${{ matrix.python-version }} $PACKAGES |
| 164 | + PACKAGE_ARGS=() |
| 165 | + while IFS= read -r package; do |
| 166 | + PACKAGE_ARGS+=("$package") |
| 167 | + done <<< "$PACKAGES" |
| 168 | + uv pip install --python-version ${{ matrix.python-version }} "${PACKAGE_ARGS[@]}" |
156 | 169 | fi |
157 | 170 | # Published stub packages can shadow the checked-in stubs when pyrefly |
158 | 171 | # resolves their relative imports. |
@@ -187,20 +200,30 @@ jobs: |
187 | 200 | run: | |
188 | 201 | PACKAGES=$(python tests/get_stubtest_system_requirements.py) |
189 | 202 | if [ -n "$PACKAGES" ]; then |
190 | | - printf "Installing APT packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n" |
191 | | - sudo apt-get update -q && sudo apt-get install -qy $PACKAGES |
| 203 | + PACKAGE_ARGS=() |
| 204 | + while IFS= read -r package; do |
| 205 | + PACKAGE_ARGS+=("$package") |
| 206 | + done <<< "$PACKAGES" |
| 207 | + printf 'Installing APT packages:\n' |
| 208 | + printf ' %s\n' "${PACKAGE_ARGS[@]}" |
| 209 | + sudo apt-get update -q && sudo apt-get install -qy "${PACKAGE_ARGS[@]}" |
192 | 210 | fi |
193 | 211 | - name: Create an isolated venv for testing |
194 | 212 | run: uv venv .venv |
195 | 213 | - name: Install 3rd-party stub dependencies |
196 | 214 | run: | |
197 | 215 | PACKAGES=$(python tests/get_external_stub_requirements.py) |
198 | 216 | if [ -n "$PACKAGES" ]; then |
199 | | - printf "Installing python packages:\n $(echo $PACKAGES | sed 's/ /\n /g')\n" |
200 | | - uv pip install --python-version ${{ matrix.python-version }} $PACKAGES |
| 217 | + PACKAGE_ARGS=() |
| 218 | + while IFS= read -r package; do |
| 219 | + PACKAGE_ARGS+=("$package") |
| 220 | + done <<< "$PACKAGES" |
| 221 | + printf 'Installing python packages:\n' |
| 222 | + printf ' %s\n' "${PACKAGE_ARGS[@]}" |
| 223 | + uv pip install --python-version ${{ matrix.python-version }} "${PACKAGE_ARGS[@]}" |
201 | 224 | fi |
202 | 225 | - name: Activate the isolated venv for the rest of the job |
203 | | - run: echo "$PWD/.venv/bin" >> $GITHUB_PATH |
| 226 | + run: echo "$PWD/.venv/bin" >> "$GITHUB_PATH" |
204 | 227 | - name: List 3rd-party stub dependencies installed |
205 | 228 | run: uv pip freeze |
206 | 229 | - name: Run pyright with basic settings on all the stubs |
|
0 commit comments