From e9fda7fcbb94d9be67cd79a4f6391f1c7e4ad30d Mon Sep 17 00:00:00 2001 From: Ayushman Chhabra <14110965+ayushmanchhabra@users.noreply.github.com> Date: Wed, 4 Oct 2023 22:29:43 -0400 Subject: [PATCH] fix: format --- .github/workflows/e2e.yml | 28 ++++++++++++---------------- src/get.js | 32 ++++++++++++++++---------------- test/fixture/preview.js | 11 ----------- 3 files changed, 28 insertions(+), 43 deletions(-) delete mode 100644 test/fixture/preview.js diff --git a/.github/workflows/e2e.yml b/.github/workflows/e2e.yml index a1ecc339f..a23d37b7e 100644 --- a/.github/workflows/e2e.yml +++ b/.github/workflows/e2e.yml @@ -12,8 +12,8 @@ jobs: e2e: strategy: matrix: - os: [macos-13] - node: [20] + os: [macos-12, ubuntu-22.04, windows-2022] + node: [16, 18, 20] fail-fast: false runs-on: ${{ matrix.os }} steps: @@ -32,17 +32,13 @@ jobs: run: corepack enable - name: Install dependencies run: npm ci - - name: TMP - Build Preview - run: npm run demo - - name: TMP - Run Preview - run: npm run preview - # - name: Check for formatting errors - # run: npm run ci:fmt - # - name: Check for linting errors - # run: npm run ci:lnt - # - name: Link module - # run: npm link nw-builder - # - name: Run unit tests - # run: npm run test:unit - # - name: Run Selenium tests - # run: npm run test:e2e + - name: Check for formatting errors + run: npm run ci:fmt + - name: Check for linting errors + run: npm run ci:lnt + - name: Link module + run: npm link nw-builder + - name: Run unit tests + run: npm run test:unit + - name: Run Selenium tests + run: npm run test:e2e diff --git a/src/get.js b/src/get.js index c64c5d4d1..08c23c2f0 100644 --- a/src/get.js +++ b/src/get.js @@ -197,22 +197,22 @@ async function get_nwjs({ bar.stop(); if (platform === "linux") { compressing.tgz.uncompress(out, cacheDir).then(() => resolve()); - // } else if (platform === "osx") { - // //TODO: compressing package does not restore symlinks on some macOS (eg: circleCI) - // const exec = function (cmd) { - // log.debug(cmd); - // const result = spawnSync(cmd, { - // shell: true, - // stdio: "inherit", - // }); - // if (result.status !== 0) { - // log.debug(`Command failed with status ${result.status}`); - // if (result.error) console.log(result.error); - // EXIT(1); - // } - // return resolve(); - // }; - // exec(`unzip -o "${out}" -d "${cacheDir}"`); + // } else if (platform === "osx") { + // //TODO: compressing package does not restore symlinks on some macOS (eg: circleCI) + // const exec = function (cmd) { + // log.debug(cmd); + // const result = spawnSync(cmd, { + // shell: true, + // stdio: "inherit", + // }); + // if (result.status !== 0) { + // log.debug(`Command failed with status ${result.status}`); + // if (result.error) console.log(result.error); + // EXIT(1); + // } + // return resolve(); + // }; + // exec(`unzip -o "${out}" -d "${cacheDir}"`); } else { compressing.zip.uncompress(out, cacheDir).then(() => resolve()); } diff --git a/test/fixture/preview.js b/test/fixture/preview.js deleted file mode 100644 index 8fa1d0eca..000000000 --- a/test/fixture/preview.js +++ /dev/null @@ -1,11 +0,0 @@ -import { spawn } from "node:child_process"; -import { resolve } from "node:path"; - -const process = spawn(resolve( - "out", - "Demo.app" -)); - -process.on("error", (error) => { - console.log(error); -});