diff --git a/.github/workflows/tests.yml b/.github/workflows/tests.yml index d530aed20d..d51ae2a4e5 100644 --- a/.github/workflows/tests.yml +++ b/.github/workflows/tests.yml @@ -124,6 +124,7 @@ jobs: with: python-version: ${{ matrix.python }} allow-prereleases: true + - run: py --list-paths || true # Show all Python paths on Windows - uses: seanmiddleditch/gha-setup-ninja@v6 - name: Install wasi-sdk (Windows) shell: pwsh @@ -163,15 +164,19 @@ jobs: echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV - name: Run Python Tests run: python -m pytest - - name: Run Tests (macOS or Linux) + - name: Run Tests (Linux or macOS) if: runner.os != 'Windows' - shell: bash - run: npm test --python="${pythonLocation}/python" env: FULL_TEST: ${{ (matrix.node == '24.x' && matrix.python == '3.14') && '1' || '0' }} + NODE_GYP_FORCE_PYTHON: "${{ env.pythonLocation }}/python" + run: npm test - name: Run Tests (Windows) if: runner.os == 'Windows' shell: bash # Building wasm on Windows requires using make generator, it only works in bash - run: npm run test --python="${pythonLocation}\\python.exe" env: FULL_TEST: ${{ (matrix.node == '24.x' && matrix.python == '3.14') && '1' || '0' }} + NODE_GYP_FORCE_PYTHON: "${{ env.pythonLocation }}\\python.exe" + run: | + echo "NODE_GYP_FORCE_PYTHON=${NODE_GYP_FORCE_PYTHON}" + npm run test + diff --git a/.github/workflows/visual-studio.yml b/.github/workflows/visual-studio.yml index c4d45c7d9f..10e6622088 100644 --- a/.github/workflows/visual-studio.yml +++ b/.github/workflows/visual-studio.yml @@ -33,6 +33,9 @@ jobs: python-version: "3.x" - name: Install Dependencies run: npm install + # - run: echo "pythonLocation=${pythonLocation}" + - run: echo "env:pythonLocation=${env:pythonLocation}" + # - run: env - name: Run Node tests - shell: pwsh - run: npm run test --python="${env:pythonLocation}\\python.exe" --msvs-version="${{ matrix.msvs-version }}" + shell: bash # Building wasm on Windows requires using make generator, it only works in bash + run: npm run test diff --git a/gyp/.github/workflows/node-gyp.yml b/gyp/.github/workflows/node-gyp.yml index 016d2e0abc..7328daaa6b 100644 --- a/gyp/.github/workflows/node-gyp.yml +++ b/gyp/.github/workflows/node-gyp.yml @@ -32,7 +32,8 @@ jobs: - uses: actions/setup-node@v6 with: node-version: "lts/*" - - uses: actions/setup-python@v6 + - name: Use Python ${{ matrix.python-version }} + uses: actions/setup-python@v6 with: python-version: ${{ matrix.python-version }} allow-prereleases: true @@ -51,14 +52,9 @@ jobs: run: | rm -rf node-gyp/gyp cp -r gyp-next node-gyp/gyp - - name: Run tests (macOS or Linux) - if: runner.os != 'Windows' + - run: echo "env:pythonLocation=${env:pythonLocation}" + # - run: env + - name: Run tests run: | cd node-gyp - npm test --python="${pythonLocation}/python" - - name: Run tests (Windows) - if: runner.os == 'Windows' - shell: pwsh - run: | - cd node-gyp - npm run test --python="${env:pythonLocation}\\python.exe" + npm test