[ci] Fix broken Windows PyPy tests (#17347)

Workaround for https://github.com/actions/setup-python/issues/1348

Authored by: bashonly
This commit is contained in:
bashonly 2026-08-04 00:01:09 -05:00 committed by GitHub
parent fdcc954df4
commit d798b9b8fb
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194
2 changed files with 27 additions and 10 deletions

View File

@ -43,24 +43,29 @@ jobs:
- uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
with: with:
persist-credentials: false persist-credentials: false
- name: Set up Python ${{ matrix.python-version }} - name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0
with: with:
python-version: ${{ matrix.python-version }} python-version: ${{ matrix.python-version }}
allow-prereleases: true allow-prereleases: true
- name: Install Deno - name: Install Deno
uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4 uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4
with: with:
deno-version: '2.3.0' # minimum supported version deno-version: '2.3.0' # minimum supported version
- name: Install Bun - name: Install Bun
uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0
with: with:
bun-version: '1.2.11' # minimum supported version bun-version: '1.2.11' # minimum supported version
no-cache: true no-cache: true
- name: Install Node - name: Install Node
uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0
with: with:
node-version: '22.0' # minimum supported version node-version: '22.0' # minimum supported version
- name: Install QuickJS (Linux) - name: Install QuickJS (Linux)
if: matrix.os == 'ubuntu-latest' if: matrix.os == 'ubuntu-latest'
shell: bash shell: bash
@ -68,6 +73,7 @@ jobs:
wget "https://bellard.org/quickjs/binary_releases/quickjs-linux-x86_64-${QJS_VERSION}.zip" -O quickjs.zip wget "https://bellard.org/quickjs/binary_releases/quickjs-linux-x86_64-${QJS_VERSION}.zip" -O quickjs.zip
unzip quickjs.zip qjs unzip quickjs.zip qjs
sudo install qjs /usr/local/bin/qjs sudo install qjs /usr/local/bin/qjs
- name: Install QuickJS (Windows) - name: Install QuickJS (Windows)
if: matrix.os == 'windows-latest' if: matrix.os == 'windows-latest'
shell: pwsh shell: pwsh
@ -76,12 +82,22 @@ jobs:
$PSNativeCommandUseErrorActionPreference = $true $PSNativeCommandUseErrorActionPreference = $true
Invoke-WebRequest "https://bellard.org/quickjs/binary_releases/quickjs-win-x86_64-${Env:QJS_VERSION}.zip" -OutFile quickjs.zip Invoke-WebRequest "https://bellard.org/quickjs/binary_releases/quickjs-win-x86_64-${Env:QJS_VERSION}.zip" -OutFile quickjs.zip
unzip quickjs.zip unzip quickjs.zip
- name: Install test requirements
shell: bash - name: Install test requirements (cpython)
if: ${{ !startsWith(matrix.python-version, 'pypy') }}
run: | run: |
python -m pip install -U --require-hashes -r "bundle/requirements/pip.txt" python -m pip install -U --require-hashes -r "bundle/requirements/pip.txt"
python -m pip install -U --require-hashes -r "bundle/requirements/test.txt" python -m pip install -U --require-hashes -r "bundle/requirements/test.txt"
python -m pip install -U --require-hashes -r "bundle/requirements/default.txt" python -m pip install -U --require-hashes -r "bundle/requirements/default.txt"
- name: Install test requirements (PyPy)
if: ${{ startsWith(matrix.python-version, 'pypy') }}
run: |
# Upgrading/downgrading pip on Windows with actions/setup-python's PyPy can cause breakage
# See https://github.com/actions/setup-python/issues/1348
python -m pip install -U --require-hashes -r "bundle/requirements/test.txt"
python -m pip install -U --require-hashes -r "bundle/requirements/default.txt"
- name: Run tests - name: Run tests
timeout-minutes: 15 timeout-minutes: 15
shell: bash shell: bash

View File

@ -85,7 +85,8 @@ jobs:
- name: Install test requirements (PyPy) - name: Install test requirements (PyPy)
if: ${{ startsWith(matrix.python-version, 'pypy') }} if: ${{ startsWith(matrix.python-version, 'pypy') }}
run: | run: |
python -m pip install -U --require-hashes -r "bundle/requirements/pip.txt" # Upgrading/downgrading pip on Windows with actions/setup-python's PyPy can cause breakage
# See https://github.com/actions/setup-python/issues/1348
python -m pip install -U --require-hashes -r "bundle/requirements/test.txt" python -m pip install -U --require-hashes -r "bundle/requirements/test.txt"
python -m pip install -U --require-hashes -r "bundle/requirements/default.txt" python -m pip install -U --require-hashes -r "bundle/requirements/default.txt"