diff --git a/.github/workflows/angular-demos.yml b/.github/workflows/angular-demos.yml index 336d85669..a81056d73 100644 --- a/.github/workflows/angular-demos.yml +++ b/.github/workflows/angular-demos.yml @@ -25,11 +25,11 @@ defaults: jobs: build-demos: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [16.x, 18.x, 20.x] + os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/react-demos.yml b/.github/workflows/react-demos.yml index 2221ad92e..2425d5fef 100644 --- a/.github/workflows/react-demos.yml +++ b/.github/workflows/react-demos.yml @@ -21,11 +21,11 @@ defaults: jobs: build: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [16.x, 18.x, 20.x] + os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v3 diff --git a/.github/workflows/vue-demos.yml b/.github/workflows/vue-demos.yml index 5d7068cb6..1acaf25af 100644 --- a/.github/workflows/vue-demos.yml +++ b/.github/workflows/vue-demos.yml @@ -20,11 +20,11 @@ defaults: jobs: build-demos: - runs-on: ubuntu-latest + runs-on: ${{ matrix.os }} strategy: matrix: - node-version: [16.x, 18.x, 20.x] + os: [ubuntu-latest, windows-latest, macos-latest] steps: - uses: actions/checkout@v3 diff --git a/demo/angular/scripts/run_demo.js b/demo/angular/scripts/run_demo.js index 0f3a00b45..eb87fda41 100644 --- a/demo/angular/scripts/run_demo.js +++ b/demo/angular/scripts/run_demo.js @@ -7,7 +7,7 @@ const availableLanguages = testData["tests"]["singleKeyword"].map( (x) => x["language"] ); -const commands = process.argv.slice(2, -1); +const args = process.argv.slice(2, -1); const language = process.argv.slice(-1)[0]; if (!availableLanguages.includes(language)) { @@ -106,7 +106,7 @@ fs.writeFileSync( const command = (process.platform === "win32") ? "npx.cmd" : "npx"; -child_process.spawn("ng", commands, { - execPath: command, - shell: true +child_process.execSync(`${command} ng ${args}`, { + shell: true, + stdio: 'inherit' }); diff --git a/demo/react-native/scripts/run_demo.js b/demo/react-native/scripts/run_demo.js index 32b908e0c..1b1b5a47f 100644 --- a/demo/react-native/scripts/run_demo.js +++ b/demo/react-native/scripts/run_demo.js @@ -5,7 +5,7 @@ const testData = require('../../../resources/.test/test_data.json'); const availableLanguages = testData.tests.singleKeyword.map((x) => x.language); -const commands = process.argv.slice(2, -1); +const args = process.argv.slice(2, -1); const language = process.argv.slice(-1)[0]; if (!availableLanguages.includes(language)) { @@ -95,7 +95,7 @@ fs.writeFileSync( const command = process.platform === 'win32' ? 'npx.cmd' : 'npx'; -child_process.spawn("react-native", commands, { - execPath: command, - shell: true +child_process.execSync(`${command} react-native ${args}`, { + shell: true, + stdio: 'inherit' }); diff --git a/demo/react/scripts/run_demo.js b/demo/react/scripts/run_demo.js index d6108389d..23425c080 100644 --- a/demo/react/scripts/run_demo.js +++ b/demo/react/scripts/run_demo.js @@ -7,7 +7,7 @@ const availableLanguages = testData["tests"]["singleKeyword"].map( (x) => x["language"] ); -const commands = process.argv.slice(2, -1); +const args = process.argv.slice(2, -1); const language = process.argv.slice(-1)[0]; if (!availableLanguages.includes(language)) { @@ -106,7 +106,7 @@ fs.writeFileSync( const command = (process.platform === "win32") ? "npx.cmd" : "npx"; -child_process.spawn("react-scripts", commands, { - execPath: command, - shell: true +child_process.execSync(`${command} react-scripts ${args}`, { + shell: true, + stdio: 'inherit' }); diff --git a/demo/vue/scripts/run_demo.js b/demo/vue/scripts/run_demo.js index 7b9251a32..408526db5 100644 --- a/demo/vue/scripts/run_demo.js +++ b/demo/vue/scripts/run_demo.js @@ -7,7 +7,7 @@ const availableLanguages = testData["tests"]["singleKeyword"].map( x => x["language"] ); -const commands = process.argv.slice(2, -1); +const args = process.argv.slice(2, -1); const language = process.argv.slice(-1)[0]; if (!availableLanguages.includes(language)) { @@ -102,7 +102,7 @@ export default porcupineModel; const command = (process.platform === "win32") ? "npx.cmd" : "npx"; -child_process.spawn("vite", commands, { - execPath: command, - shell: true +child_process.execSync(`${command} vite ${args}`, { + shell: true, + stdio: 'inherit' }); diff --git a/demo/web/scripts/run_demo.js b/demo/web/scripts/run_demo.js index 07f1ba4e6..306942865 100644 --- a/demo/web/scripts/run_demo.js +++ b/demo/web/scripts/run_demo.js @@ -112,7 +112,7 @@ fs.writeFileSync( const command = (process.platform === "win32") ? "npx.cmd" : "npx"; -child_process.spawn("http-server", ["-a", "localhost", "-p", "5000"], { - execPath: command, - shell: true +child_process.execSync(`${command} http-server -a localhost -p 5000`, { + shell: true, + stdio: 'inherit' });