diff --git a/.github/workflows/integration-tests.yml b/.github/workflows/integration-tests.yml index eeecfbae..3e707881 100644 --- a/.github/workflows/integration-tests.yml +++ b/.github/workflows/integration-tests.yml @@ -47,5 +47,13 @@ jobs: - uses: Swatinem/rust-cache@v2 - run: pnpm install - run: pnpm build - - run: pnpm test + - name: packager integration tests + run: | + cd bindings/packager/nodejs + pnpm test + timeout-minutes: 30 + - name: updater integration tests + run: | + cd bindings/updater/nodejs + pnpm test timeout-minutes: 30 diff --git a/bindings/packager/nodejs/package.json b/bindings/packager/nodejs/package.json index b306dae4..77c53d73 100644 --- a/bindings/packager/nodejs/package.json +++ b/bindings/packager/nodejs/package.json @@ -33,6 +33,7 @@ "build:debug": "pnpm build:config && pnpm build:ts && napi build --platform", "prepublishOnly": "napi prepublish -t npm --gh-release-id $RELEASE_ID", "test": "ava --no-worker-threads", + "pretest": "pnpm run build:ts", "universal": "napi universal", "version": "napi version" }, diff --git a/bindings/updater/nodejs/__test__/index.spec.mjs b/bindings/updater/nodejs/__test__/index.spec.mjs index c4bf8961..a6ad9cdc 100644 --- a/bindings/updater/nodejs/__test__/index.spec.mjs +++ b/bindings/updater/nodejs/__test__/index.spec.mjs @@ -14,11 +14,15 @@ const UPDATER_PRIVATE_KEY = test("it works", async (t) => { const isWindows = process.platform === "win32"; const isMacos = process.platform === "darwin"; - const appDir = join(__dirname, "..", "__test__", "app"); + const appDir = join(__dirname, "app"); const target = `${isWindows ? "windows" : isMacos ? "macos" : "linux"}-${ process.arch === "x64" ? "x86_64" : "i686" }`; + await execa("pnpm", ["build"], { + cwd: join(__dirname, "..", "..", "..", "packager", "nodejs"), + }); + const buildApp = async (version, updaterFormats) => { await writeFile( join(appDir, "dist", "ver.js"), diff --git a/package.json b/package.json index 9700ad46..177adfec 100644 --- a/package.json +++ b/package.json @@ -2,7 +2,6 @@ "private": true, "scripts": { "build": "pnpm run -r --parallel build", - "test": "pnpm run -r --parallel test", "format": "prettier --write .", "format:check": "prettier --check ." },