diff --git a/.github/actions/test/action.yml b/.github/actions/test/action.yml index 335d2a46cbd..8c731fede78 100644 --- a/.github/actions/test/action.yml +++ b/.github/actions/test/action.yml @@ -48,12 +48,14 @@ runs: shell: bash --noprofile --norc -eo pipefail -x {0} run: | set -ea + runner_os="$(echo "${RUNNER_OS}" | tr '[:upper:]' '[:lower:]')" npm ci npm run package npm run test-${runner_os} env: # https://www.electronjs.org/docs/latest/api/environment-variables - ELECTRON_NO_ATTACH_CONSOLE: true + ELECTRON_NO_ATTACH_CONSOLE: 'true' + ELECTRON_SKIP_NOTARIZATION: 'true' - name: Compress custom source if: runner.os != 'Windows' diff --git a/forge.config.ts b/forge.config.ts index 53a6130ede5..98785c6c1dc 100644 --- a/forge.config.ts +++ b/forge.config.ts @@ -21,7 +21,7 @@ every byte of data was written correctly and much more.`; let osxSigningConfig: any = {}; let winSigningConfig: any = {}; -if (process.env.NODE_ENV !== 'development') { +if (process.env.NODE_ENV !== 'development' || process.env.ELECTRON_SKIP_NOTARIZATION !== 'true') { osxSigningConfig.osxSign = { optionsForFile: () => ({ entitlements: './entitlements.mac.plist', diff --git a/lib/gui/app/preload.ts b/lib/gui/app/preload.ts index 6b0f57038f7..ad1b81aaa4c 100644 --- a/lib/gui/app/preload.ts +++ b/lib/gui/app/preload.ts @@ -4,9 +4,9 @@ import * as webapi from '../webapi'; declare global { - interface Window { - etcher: typeof webapi; - } + interface Window { + etcher: typeof webapi; + } } window['etcher'] = webapi; diff --git a/lib/gui/etcher.ts b/lib/gui/etcher.ts index d1637da44b5..faf63aed9b0 100644 --- a/lib/gui/etcher.ts +++ b/lib/gui/etcher.ts @@ -242,7 +242,6 @@ electron.app.on('before-quit', () => { process.exit(EXIT_CODES.SUCCESS); }); - // this is replaced at build-time with the path to etcher-util declare const ETCHER_UTIL_BIN_PATH: string; diff --git a/lib/gui/webapi.ts b/lib/gui/webapi.ts index be2f48c9c3e..1bcfe219356 100644 --- a/lib/gui/webapi.ts +++ b/lib/gui/webapi.ts @@ -9,5 +9,5 @@ import { ipcRenderer } from 'electron'; // binary. We should instead export a function that asks the main process to launch // the binary itself. export async function getEtcherUtilPath(): Promise { - return await ipcRenderer.invoke('get-util-path'); + return await ipcRenderer.invoke('get-util-path'); } diff --git a/package.json b/package.json index aebd3d36243..67802ce2527 100644 --- a/package.json +++ b/package.json @@ -19,9 +19,9 @@ "lint": "npm run lint-ts && npm run lint-css", "test-gui": "electron-mocha --recursive --reporter spec --window-config tests/gui/window-config.json --require ts-node/register/transpile-only --require-main tests/gui/allow-renderer-process-reuse.ts --full-trace --no-sandbox --renderer tests/gui/**/*.ts", "test-shared": "electron-mocha --recursive --reporter spec --require ts-node/register/transpile-only --require-main tests/gui/allow-renderer-process-reuse.ts --full-trace --no-sandbox tests/shared/**/*.ts", + "test-windows": "npm run lint && npm run test-gui && npm run test-shared", "test-macos": "npm run lint && npm run test-gui && npm run test-shared", "test-linux": "npm run lint && xvfb-run --auto-servernum npm run test-gui && xvfb-run --auto-servernum npm run test-shared", - "test-windows": "npm run lint && npm run test-gui && npm run test-shared", "test": "echo npm run test-{linux,windows,macos}", "package": "electron-forge package", "start": "electron-forge start",