From d798b9b8fbbcc9dd8d2b8df863bcddfa18362f5d Mon Sep 17 00:00:00 2001 From: bashonly <88596187+bashonly@users.noreply.github.com> Date: Tue, 4 Aug 2026 00:01:09 -0500 Subject: [PATCH] [ci] Fix broken Windows PyPy tests (#17347) Workaround for https://github.com/actions/setup-python/issues/1348 Authored by: bashonly --- .github/workflows/challenge-tests.yml | 34 ++++++++++++++++++++------- .github/workflows/core.yml | 3 ++- 2 files changed, 27 insertions(+), 10 deletions(-) diff --git a/.github/workflows/challenge-tests.yml b/.github/workflows/challenge-tests.yml index a09ddda46d..89b3a94bb9 100644 --- a/.github/workflows/challenge-tests.yml +++ b/.github/workflows/challenge-tests.yml @@ -43,45 +43,61 @@ jobs: - uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0 with: persist-credentials: false + - name: Set up Python ${{ matrix.python-version }} uses: actions/setup-python@ece7cb06caefa5fff74198d8649806c4678c61a1 # v6.3.0 with: python-version: ${{ matrix.python-version }} allow-prereleases: true + - name: Install Deno uses: denoland/setup-deno@667a34cdef165d8d2b2e98dde39547c9daac7282 # v2.0.4 with: deno-version: '2.3.0' # minimum supported version + - name: Install Bun uses: oven-sh/setup-bun@0c5077e51419868618aeaa5fe8019c62421857d6 # v2.2.0 with: bun-version: '1.2.11' # minimum supported version no-cache: true + - name: Install Node uses: actions/setup-node@48b55a011bda9f5d6aeb4c2d9c7362e8dae4041e # v6.4.0 with: node-version: '22.0' # minimum supported version + - name: Install QuickJS (Linux) if: matrix.os == 'ubuntu-latest' shell: bash run: | - wget "https://bellard.org/quickjs/binary_releases/quickjs-linux-x86_64-${QJS_VERSION}.zip" -O quickjs.zip - unzip quickjs.zip qjs - sudo install qjs /usr/local/bin/qjs + wget "https://bellard.org/quickjs/binary_releases/quickjs-linux-x86_64-${QJS_VERSION}.zip" -O quickjs.zip + unzip quickjs.zip qjs + sudo install qjs /usr/local/bin/qjs + - name: Install QuickJS (Windows) if: matrix.os == 'windows-latest' shell: pwsh run: | - $ErrorActionPreference = "Stop" - $PSNativeCommandUseErrorActionPreference = $true - Invoke-WebRequest "https://bellard.org/quickjs/binary_releases/quickjs-win-x86_64-${Env:QJS_VERSION}.zip" -OutFile quickjs.zip - unzip quickjs.zip - - name: Install test requirements - shell: bash + $ErrorActionPreference = "Stop" + $PSNativeCommandUseErrorActionPreference = $true + Invoke-WebRequest "https://bellard.org/quickjs/binary_releases/quickjs-win-x86_64-${Env:QJS_VERSION}.zip" -OutFile quickjs.zip + unzip quickjs.zip + + - name: Install test requirements (cpython) + if: ${{ !startsWith(matrix.python-version, 'pypy') }} run: | 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/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 timeout-minutes: 15 shell: bash diff --git a/.github/workflows/core.yml b/.github/workflows/core.yml index 4f0b12329b..37c30e0140 100644 --- a/.github/workflows/core.yml +++ b/.github/workflows/core.yml @@ -85,7 +85,8 @@ jobs: - name: Install test requirements (PyPy) if: ${{ startsWith(matrix.python-version, 'pypy') }} 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/default.txt"