mirror of
https://github.com/electron/node-gyp.git
synced 2025-09-15 13:43:40 +02:00
GitHub Actions: npm test is failing Windows tests on M1 Macs (#3011)
* GitHub Actions: npm test is failing Windows tests on M1 Macs `npm test` is running and failing Windows `find-visualstudio` tests on an M1 Mac!!! These tests are not being run or not failing on Intel Macs. * Only run "Find Visual Studio" tests on Windows * Update test/test-find-visualstudio.js Co-authored-by: Christian Clauss <cclauss@me.com> --------- Co-authored-by: Stefan Stojanovic <StefanStojanovic@users.noreply.github.com>
This commit is contained in:
parent
77737e45db
commit
0bab6a071b
2 changed files with 15 additions and 5 deletions
14
.github/workflows/tests.yml
vendored
14
.github/workflows/tests.yml
vendored
|
@ -93,11 +93,15 @@ jobs:
|
||||||
fail-fast: false
|
fail-fast: false
|
||||||
max-parallel: 15
|
max-parallel: 15
|
||||||
matrix:
|
matrix:
|
||||||
os: [macos, ubuntu, windows]
|
os: [macos-latest, ubuntu-latest, windows-latest]
|
||||||
python: ["3.8", "3.10", "3.12"]
|
python: ["3.8", "3.10", "3.12"]
|
||||||
node: [16.x, 18.x, 20.x]
|
node: [16.x, 18.x, 20.x]
|
||||||
|
include: # `npm test` is running Windows find-visualstudio tests on an M1 Mac!!!
|
||||||
|
- os: macos-14
|
||||||
|
python: "3.12"
|
||||||
|
node: 20.x
|
||||||
name: ${{ matrix.os }} - ${{ matrix.python }} - ${{ matrix.node }}
|
name: ${{ matrix.os }} - ${{ matrix.python }} - ${{ matrix.node }}
|
||||||
runs-on: ${{ matrix.os }}-latest
|
runs-on: ${{ matrix.os }}
|
||||||
steps:
|
steps:
|
||||||
- name: Checkout Repository
|
- name: Checkout Repository
|
||||||
uses: actions/checkout@v4
|
uses: actions/checkout@v4
|
||||||
|
@ -116,20 +120,20 @@ jobs:
|
||||||
npm install
|
npm install
|
||||||
pip install pytest
|
pip install pytest
|
||||||
- name: Set Windows Env
|
- name: Set Windows Env
|
||||||
if: runner.os == 'Windows'
|
if: startsWith(matrix.os, 'windows')
|
||||||
run: |
|
run: |
|
||||||
echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV
|
echo 'GYP_MSVS_VERSION=2015' >> $Env:GITHUB_ENV
|
||||||
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
|
echo 'GYP_MSVS_OVERRIDE_PATH=C:\\Dummy' >> $Env:GITHUB_ENV
|
||||||
- name: Run Python Tests
|
- name: Run Python Tests
|
||||||
run: python -m pytest
|
run: python -m pytest
|
||||||
- name: Run Tests (macOS or Linux)
|
- name: Run Tests (macOS or Linux)
|
||||||
if: runner.os != 'Windows'
|
if: "!startsWith(matrix.os, 'windows')"
|
||||||
shell: bash
|
shell: bash
|
||||||
run: npm test --python="${pythonLocation}/python"
|
run: npm test --python="${pythonLocation}/python"
|
||||||
env:
|
env:
|
||||||
FULL_TEST: ${{ (matrix.node == '20.x' && matrix.python == '3.12') && '1' || '0' }}
|
FULL_TEST: ${{ (matrix.node == '20.x' && matrix.python == '3.12') && '1' || '0' }}
|
||||||
- name: Run Tests (Windows)
|
- name: Run Tests (Windows)
|
||||||
if: runner.os == 'Windows'
|
if: startsWith(matrix.os, 'windows')
|
||||||
shell: pwsh
|
shell: pwsh
|
||||||
run: npm run test --python="${env:pythonLocation}\\python.exe"
|
run: npm run test --python="${env:pythonLocation}\\python.exe"
|
||||||
env:
|
env:
|
||||||
|
|
|
@ -21,7 +21,13 @@ class TestVisualStudioFinder extends VisualStudioFinder {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
const shouldSkip = process.platform !== 'win32'
|
||||||
|
|
||||||
describe('find-visualstudio', function () {
|
describe('find-visualstudio', function () {
|
||||||
|
if (shouldSkip) {
|
||||||
|
return
|
||||||
|
}
|
||||||
|
|
||||||
this.beforeAll(function () {
|
this.beforeAll(function () {
|
||||||
// Condition to skip the test suite
|
// Condition to skip the test suite
|
||||||
if (process.env.SystemRoot === undefined) {
|
if (process.env.SystemRoot === undefined) {
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue