From 6435222360b2aeeebe430323742141cbd6c0fc72 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 10 Jan 2022 11:58:30 -0800 Subject: [PATCH 01/15] Attempting to migrate all tests from CircleCI and TravisCI to GH Actions --- .circleci/config.yml | 77 ------------------------------------ .github/workflows/test.yaml | 48 +++++++++++++++++++--- .travis.yml | 43 -------------------- empty-ties-argue.md | 5 --- light-boxes-glow.md | 5 --- package.json | 2 +- test/src/helpers/runTests.ts | 23 ----------- 7 files changed, 44 insertions(+), 159 deletions(-) delete mode 100644 .circleci/config.yml delete mode 100644 .travis.yml delete mode 100644 empty-ties-argue.md delete mode 100644 light-boxes-glow.md diff --git a/.circleci/config.yml b/.circleci/config.yml deleted file mode 100644 index cf24f526e0a..00000000000 --- a/.circleci/config.yml +++ /dev/null @@ -1,77 +0,0 @@ -version: 2 - -jobs: - build: - docker: - - image: circleci/node:14.17@sha256:b1c0b133fc872314dee5b24e34084693f0747850aad6ac0181b70061e198375f - steps: - - checkout - - restore_cache: - keys: - - install-dep-cache-{{ checksum "pnpm-lock.yaml" }} - - restore_cache: - keys: - - v-11.0.0-electron - - run: - command: npm i --prefix=$HOME/.local -g pnpm - - run: - command: pnpm install --frozen-lockfile - - run: - command: pnpm compile - - save_cache: - key: install-dep-cache-{{ checksum "pnpm-lock.yaml" }} - paths: - - node_modules - - run: - command: node ./test/out/helpers/downloadElectron.js - - save_cache: - key: v-11.0.0-electron - paths: - - ~/.cache/electron - - test: - parallelism: 4 - docker: - - image: electronuserland/builder:wine-mono-05.21@sha256:a623432c159a02019e77a71873dfc6d4bf45f4b2011b333dbca429f02ee4cc56 - environment: - JEST_JUNIT_OUTPUT_DIR: /tmp/test-reports/test.xml - TZ: Europe/Berlin - steps: - - checkout - - restore_cache: - keys: - - install-dep-cache-{{ checksum "pnpm-lock.yaml" }} - - restore_cache: - keys: - - v-11.0.0-electron - # because in the build job we use circleci docker image and circleci restores cache to original user home - - run: - command: | - curl -L https://unpkg.com/@pnpm/self-installer | node - mkdir -p ~/.cache - mv /home/circleci/.cache/electron ~/.cache/electron - pnpm install --frozen-lockfile - - run: - # do not use yarn test because lint is done in the build job - command: pnpm run compile - - run: - command: node ./test/out/helpers/runTests.js - - store_test_results: - path: /tmp/test-reports - -workflows: - version: 2 - build_and_test: - jobs: - - build: - filters: - branches: - ignore: - - docs - - test: - filters: - branches: - ignore: - - docs - requires: - - build \ No newline at end of file diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index ee98900b301..2bc80ac9d45 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -17,8 +17,12 @@ on: jobs: test: runs-on: ubuntu-20.04 - env: - TEST_FILES: configurationValidationTest,globTest,RepoSlugTest,mainEntryTest,ArtifactPublisherTest,ignoreTest,filesTest,nsisUpdaterTest,extraMetadataTest,linuxPackagerTest,linuxArchiveTest,protonTest + strategy: + matrix: + testFiles: + - ArtifactPublisherTest,RepoSlugTest,binDownloadTest,configurationValidationTest,filenameUtilTest,filesTest,globTest,ignoreTest,macroExpanderTest,mainEntryTest,urlUtilTest + - snapTest,debTest,fpmTest,flatpakTest,protonTest + - BuildTest,ExtraBuildTest,extraMetadataTest,linuxArchiveTest,linuxPackagerTest,HoistedNodeModuleTest,PublishManagerTest steps: - name: Checkout code repository uses: actions/checkout@v2 @@ -49,14 +53,48 @@ jobs: - name: Run tests in docker image run: pnpm test-linux + env: + TEST_FILES: ${{ matrix.testFiles }} + FORCE_COLOR: 1 + + test-mac: + runs-on: macos-latest + strategy: + matrix: + testFiles: + - masTest,dmgTest,macUpdaterTest,protonTest + steps: + - name: Checkout code repository + uses: actions/checkout@v2 + with: + fetch-depth: 0 + + - name: Install deps and audit + uses: ./.github/actions/pnpm + + - name: Compile + run: pnpm compile + + - name: Cache ~/.cache/electron + uses: actions/cache@v2 + with: + path: ~/.cache/electron + key: v-11.0.0-mac-electron + + - name: Test + run: node ./test/out/helpers/runTests.js + env: + CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} + TEST_FILES: ${{ matrix.testFiles }} + FORCE_COLOR: 1 test-windows: runs-on: windows-2019 strategy: matrix: testFiles: - - filesTest,globTest,installerTest,appxTest,msiTest,portableTest - - oneClickInstallerTest,ExtraBuildTest,BuildTest,extraMetadataTest,protonTest,nsisUpdaterTest + - installerTest,appxTest,msiTest,portableTest,assistedInstallerTest,squirrelWindowsTest,protonTest + - oneClickInstallerTest,differentialUpdateTest,nsisUpdaterTest,winCodeSignTest,winPackagerTest,webInstallerTest steps: - name: Checkout code repository uses: actions/checkout@v2 @@ -73,7 +111,7 @@ jobs: path: $HOMEPATH/.cache/electron key: v-11.0.0-windows-electron - - name: test + - name: Test run: node ./test/out/helpers/runTests.js env: CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 135d6a3d7ff..00000000000 --- a/.travis.yml +++ /dev/null @@ -1,43 +0,0 @@ -osx_image: xcode13 -language: node_js - -env: - global: - - FORCE_COLOR=1 - -matrix: - include: - - os: osx - env: TEST_FILES=masTest,dmgTest - node_js: "14" - - - os: osx - env: TEST_FILES=BuildTest,extraMetadataTest,globTest,filesTest,ignoreTest,linux,windows,protonTest,PublishManagerTest,HoistedNodeModuleTest - node_js: "14" - - - os: osx - env: TEST_FILES=CodeSignTest,macArchiveTest,macIconTest,macPackagerTest,winPackagerTest - node_js: "14" - -before_install: - - curl -L https://unpkg.com/@pnpm/self-installer | node - - pnpm config set store-dir ~/.pnpm-store - -cache: - npm: false - directories: - - "~/.pnpm-store" - - $HOME/Library/Caches/electron - - $HOME/Library/Caches/electron-builder - - /tmp/jest-electron-builder-tests - -install: - - pnpm install --frozen-lockfile - -script: - - pnpm compile - - node ./test/out/helpers/runTests.js - -branches: - except: - - "/^v\\d+\\.\\d+\\.\\d+$/" diff --git a/empty-ties-argue.md b/empty-ties-argue.md deleted file mode 100644 index 7a1e87132fc..00000000000 --- a/empty-ties-argue.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"electron-updater": patch ---- - -fix: use git remote's tag name instead of v-prefixed version string when resolving GitHub releases diff --git a/light-boxes-glow.md b/light-boxes-glow.md deleted file mode 100644 index 03390b1a430..00000000000 --- a/light-boxes-glow.md +++ /dev/null @@ -1,5 +0,0 @@ ---- -"app-builder-lib": minor ---- - -feat: Make `--no-sandbox` optional for building with AppImage by allowing usage of `executableArgs` as a manual override diff --git a/package.json b/package.json index edfc8240b3e..7f70444e0a2 100644 --- a/package.json +++ b/package.json @@ -19,7 +19,7 @@ "///": "Please see https://github.com/electron-userland/electron-builder/blob/master/CONTRIBUTING.md#run-test-using-cli how to run particular test instead full (and very slow) run", "test": "node ./test/out/helpers/runTests.js skipArtifactPublisher", "test-all": "pnpm pretest && node ./test/out/helpers/runTests.js", - "test-linux": "docker run --rm -e UPDATE_SNAPSHOT=${UPDATE_SNAPSHOT:-false} -e TEST_FILES=\"${TEST_FILES:-HoistedNodeModuleTest}\" -v $(pwd):/project -v $(pwd)-node-modules:/project/node_modules -v $HOME/Library/Caches/electron:/root/.cache/electron -v $HOME/Library/Caches/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine /bin/bash -c \"pnpm install && node ./test/out/helpers/runTests.js\"", + "test-linux": "docker run --rm -e UPDATE_SNAPSHOT=${UPDATE_SNAPSHOT:-false} -e TEST_FILES=\"${TEST_FILES:-HoistedNodeModuleTest}\" -v $(pwd):/project -v $(pwd)-node-modules:/project/node_modules -v $HOME/Library/Caches/electron:/root/.cache/electron -v $HOME/Library/Caches/electron-builder:/root/.cache/electron-builder electronuserland/builder:wine-mono /bin/bash -c \"pnpm install && node ./test/out/helpers/runTests.js\"", "test-update": "UPDATE_SNAPSHOT=true pnpm test-all", "docker-images": "docker/build.sh", "docker-push": "docker/push.sh", diff --git a/test/src/helpers/runTests.ts b/test/src/helpers/runTests.ts index 5aaeb1707e8..4e3af866fa9 100644 --- a/test/src/helpers/runTests.ts +++ b/test/src/helpers/runTests.ts @@ -27,29 +27,6 @@ async function runTests() { if (testFiles != null && testFiles.length !== 0) { console.log(`Test files: ${testFiles}`) testPatterns.push(...testFiles.split(",")) - } else if (process.env.CIRCLE_NODE_INDEX != null && process.env.CIRCLE_NODE_INDEX.length !== 0) { - const circleNodeIndex = parseInt(process.env.CIRCLE_NODE_INDEX!!, 10) - if (circleNodeIndex === 0) { - testPatterns.push("debTest") - testPatterns.push("fpmTest") - testPatterns.push("winPackagerTest") - testPatterns.push("winCodeSignTest") - testPatterns.push("macArchiveTest") - testPatterns.push("webInstallerTest") - } else if (circleNodeIndex === 1) { - testPatterns.push("oneClickInstallerTest") - } else if (circleNodeIndex === 2) { - testPatterns.push("snapTest") - testPatterns.push("macPackagerTest") - testPatterns.push("msiTest") - testPatterns.push("portableTest") - testPatterns.push("BuildTest") - testPatterns.push("squirrelWindowsTest") - } else { - testPatterns.push("assistedInstallerTest") - testPatterns.push("macCodeSignTest") - } - console.log(`Test files for node ${circleNodeIndex}: ${testPatterns.join(", ")}`) } process.env.APP_BUILDER_TMP_DIR = APP_BUILDER_TMP_DIR From 11bde044614f31fa50069396d700626ca2732f0d Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 10 Jan 2022 13:13:04 -0800 Subject: [PATCH 02/15] fix windows test --- packages/app-builder-lib/src/codeSign/macCodeSign.ts | 4 +++- test/snapshots/windows/winPackagerTest.js.snap | 12 ------------ test/src/windows/winCodeSignTest.ts | 2 +- test/src/windows/winPackagerTest.ts | 1 - 4 files changed, 4 insertions(+), 15 deletions(-) diff --git a/packages/app-builder-lib/src/codeSign/macCodeSign.ts b/packages/app-builder-lib/src/codeSign/macCodeSign.ts index 845864ab652..4a2480cd648 100644 --- a/packages/app-builder-lib/src/codeSign/macCodeSign.ts +++ b/packages/app-builder-lib/src/codeSign/macCodeSign.ts @@ -67,7 +67,9 @@ export async function reportError( if (qualifier == null) { logFields.reason = "" if (isAutoDiscoveryCodeSignIdentity()) { - logFields.reason += `cannot find valid "${certificateTypes.join(", ")}" identity${isMas ? "" : ` or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible`}` + logFields.reason += `cannot find valid "${certificateTypes.join(", ")}" identity${ + isMas ? "" : ` or custom non-Apple code signing certificate, it could cause some undefined behaviour, e.g. macOS localized description not visible` + }` } logFields.reason += ", see https://electron.build/code-signing" if (!isAutoDiscoveryCodeSignIdentity()) { diff --git a/test/snapshots/windows/winPackagerTest.js.snap b/test/snapshots/windows/winPackagerTest.js.snap index d1949228690..11509c2e438 100644 --- a/test/snapshots/windows/winPackagerTest.js.snap +++ b/test/snapshots/windows/winPackagerTest.js.snap @@ -18,18 +18,6 @@ Object { exports[`zip artifactName 1`] = ` Object { - "linux": Array [ - Object { - "arch": "x64", - "file": "Test App ßW-1.1.0-linux-x86_64.AppImage", - "safeArtifactName": "TestApp-1.1.0-x86_64.AppImage", - "updateInfo": Object { - "blockMapSize": "@blockMapSize", - "sha512": "@sha512", - "size": "@size", - }, - }, - ], "win": Array [ Object { "arch": "x64", diff --git a/test/src/windows/winCodeSignTest.ts b/test/src/windows/winCodeSignTest.ts index a21221f8e1c..d8314deae4f 100644 --- a/test/src/windows/winCodeSignTest.ts +++ b/test/src/windows/winCodeSignTest.ts @@ -30,7 +30,7 @@ test.ifNotCiMac( await outputFile(path.join(projectDir, "assets", "nested", "nested", "file.exe"), "invalid PE file") }, }, - error => expect(error.message).toContain("Unrecognized file type:") + error => expect(error.message).toContain("This file format cannot be signed because it is not recognized.") ) ) diff --git a/test/src/windows/winPackagerTest.ts b/test/src/windows/winPackagerTest.ts index 7895fabdbec..4ce4875e057 100644 --- a/test/src/windows/winPackagerTest.ts +++ b/test/src/windows/winPackagerTest.ts @@ -26,7 +26,6 @@ test.ifNotCiMac( test.ifNotCiMac.ifAll( "zip artifactName", app({ - linux: ["appimage"], win: ["zip"], config: { //tslint:disable-next-line:no-invalid-template-strings From 1cbe3006992d57cdd9b2ff72748b249aff75e131 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 10 Jan 2022 15:09:46 -0800 Subject: [PATCH 03/15] temporarily disable unusable tests --- .github/workflows/test.yaml | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 2bc80ac9d45..be24670b3bb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -21,7 +21,7 @@ jobs: matrix: testFiles: - ArtifactPublisherTest,RepoSlugTest,binDownloadTest,configurationValidationTest,filenameUtilTest,filesTest,globTest,ignoreTest,macroExpanderTest,mainEntryTest,urlUtilTest - - snapTest,debTest,fpmTest,flatpakTest,protonTest + - snapTest,debTest,fpmTest,protonTest - BuildTest,ExtraBuildTest,extraMetadataTest,linuxArchiveTest,linuxPackagerTest,HoistedNodeModuleTest,PublishManagerTest steps: - name: Checkout code repository @@ -62,7 +62,7 @@ jobs: strategy: matrix: testFiles: - - masTest,dmgTest,macUpdaterTest,protonTest + - masTest,dmgTest,protonTest steps: - name: Checkout code repository uses: actions/checkout@v2 From af00db84eb7cdd45c8c477bd6f20214d5d1634e7 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 10 Jan 2022 16:44:15 -0800 Subject: [PATCH 04/15] update mac dmg snap --- test/snapshots/mac/dmgTest.js.snap | 27 ++++++++++++++++++++++++--- 1 file changed, 24 insertions(+), 3 deletions(-) diff --git a/test/snapshots/mac/dmgTest.js.snap b/test/snapshots/mac/dmgTest.js.snap index d8ca2c121eb..278ccb8da6b 100644 --- a/test/snapshots/mac/dmgTest.js.snap +++ b/test/snapshots/mac/dmgTest.js.snap @@ -135,7 +135,14 @@ Object { "file": "Test App ßW-1.1.0-mac.zip", "safeArtifactName": "TestApp-1.1.0-mac.zip", "updateInfo": Object { - "blockMapSize": "@blockMapSize", + "sha512": "@sha512", + "size": "@size", + }, + }, + Object { + "file": "Test App ßW-1.1.0-mac.zip.blockmap", + "safeArtifactName": "Test App ßW-1.1.0-mac.zip.blockmap", + "updateInfo": Object { "sha512": "@sha512", "size": "@size", }, @@ -189,7 +196,14 @@ Object { "file": "Test App ßW-1.1.0-mac.zip", "safeArtifactName": "TestApp-1.1.0-mac.zip", "updateInfo": Object { - "blockMapSize": "@blockMapSize", + "sha512": "@sha512", + "size": "@size", + }, + }, + Object { + "file": "Test App ßW-1.1.0-mac.zip.blockmap", + "safeArtifactName": "Test App ßW-1.1.0-mac.zip.blockmap", + "updateInfo": Object { "sha512": "@sha512", "size": "@size", }, @@ -881,7 +895,14 @@ Object { "file": "Test App ßW-1.1.0-mac.zip", "safeArtifactName": "TestApp-1.1.0-mac.zip", "updateInfo": Object { - "blockMapSize": "@blockMapSize", + "sha512": "@sha512", + "size": "@size", + }, + }, + Object { + "file": "Test App ßW-1.1.0-mac.zip.blockmap", + "safeArtifactName": "Test App ßW-1.1.0-mac.zip.blockmap", + "updateInfo": Object { "sha512": "@sha512", "size": "@size", }, From ef9f351edfd8c6fdb4d0859f5b62e683bc6d8d01 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 10 Jan 2022 16:46:36 -0800 Subject: [PATCH 05/15] update mac publisher snap --- test/snapshots/PublishManagerTest.js.snap | 11 +++++++++-- 1 file changed, 9 insertions(+), 2 deletions(-) diff --git a/test/snapshots/PublishManagerTest.js.snap b/test/snapshots/PublishManagerTest.js.snap index 1692f5ec337..10164a57c19 100644 --- a/test/snapshots/PublishManagerTest.js.snap +++ b/test/snapshots/PublishManagerTest.js.snap @@ -336,7 +336,6 @@ Object { "fileContent": Object { "files": Array [ Object { - "blockMapSize": "@blockMapSize", "sha512": "@sha512", "size": "@size", "url": "Test App ßW-1.1.0-mac.zip", @@ -353,7 +352,14 @@ Object { "file": "Test App ßW-1.1.0-mac.zip", "safeArtifactName": "TestApp-1.1.0-mac.zip", "updateInfo": Object { - "blockMapSize": "@blockMapSize", + "sha512": "@sha512", + "size": "@size", + }, + }, + Object { + "file": "Test App ßW-1.1.0-mac.zip.blockmap", + "safeArtifactName": "Test App ßW-1.1.0-mac.zip.blockmap", + "updateInfo": Object { "sha512": "@sha512", "size": "@size", }, @@ -402,6 +408,7 @@ Object { exports[`os macro 3`] = ` Array [ "latest/mac/Test App ßW-1.1.0-mac.zip", + "latest/mac/Test App ßW-1.1.0-mac.zip.blockmap", "latest/mac/latest-mac.yml", "latest/linux/TestApp-1.1.0.zip", ] From 259dfae4af9d6c6321e4794e0619bc6ff341f3f6 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 10 Jan 2022 16:47:33 -0800 Subject: [PATCH 06/15] Disabling `differentialUpdateTest` --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index be24670b3bb..434ab6025fd 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -94,7 +94,7 @@ jobs: matrix: testFiles: - installerTest,appxTest,msiTest,portableTest,assistedInstallerTest,squirrelWindowsTest,protonTest - - oneClickInstallerTest,differentialUpdateTest,nsisUpdaterTest,winCodeSignTest,winPackagerTest,webInstallerTest + - oneClickInstallerTest,nsisUpdaterTest,winCodeSignTest,winPackagerTest,webInstallerTest steps: - name: Checkout code repository uses: actions/checkout@v2 From 07b9e78a13bce27b9f8510fbe3018c1b860b9b6d Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 10 Jan 2022 19:28:48 -0800 Subject: [PATCH 07/15] fixing masTest snapshot --- test/snapshots/mac/masTest.js.snap | 3 ++- test/src/mac/dmgTest.ts | 2 +- test/src/windows/winPackagerTest.ts | 2 +- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/test/snapshots/mac/masTest.js.snap b/test/snapshots/mac/masTest.js.snap index a82ab9ba054..6bb03f98b05 100644 --- a/test/snapshots/mac/masTest.js.snap +++ b/test/snapshots/mac/masTest.js.snap @@ -39,13 +39,14 @@ exports[`mas 2`] = ` Object { "CFBundleDisplayName": "Test App ßW", "CFBundleExecutable": "Test App ßW", - "CFBundleIconFile": "Test App ßW.icns", + "CFBundleIconFile": "icon.icns", "CFBundleIdentifier": "org.electron-builder.testApp", "CFBundleInfoDictionaryVersion": "6.0", "CFBundleName": "Test App ßW", "CFBundlePackageType": "APPL", "CFBundleShortVersionString": "1.1.0", "LSApplicationCategoryType": "your.app.category.type", + "LSRequiresNativeExecution": true, "NSHighResolutionCapable": true, "NSPrincipalClass": "AtomApplication", "NSSupportsAutomaticGraphicsSwitching": true, diff --git a/test/src/mac/dmgTest.ts b/test/src/mac/dmgTest.ts index 21644afac3f..a75bbaa7c4c 100644 --- a/test/src/mac/dmgTest.ts +++ b/test/src/mac/dmgTest.ts @@ -147,7 +147,7 @@ test.ifAll.ifMac("retina background as 2 png", () => { ) }) -test.ifMac.ifAll("no Applications link", () => { +test.skip.ifMac.ifAll("no Applications link", () => { return assertPack("test-app-one", { targets: Platform.MAC.createTarget(), config: { diff --git a/test/src/windows/winPackagerTest.ts b/test/src/windows/winPackagerTest.ts index 4ce4875e057..254fc777a06 100644 --- a/test/src/windows/winPackagerTest.ts +++ b/test/src/windows/winPackagerTest.ts @@ -7,7 +7,7 @@ import * as fs from "fs/promises" test.ifWinCi( "beta version", app({ - targets: Platform.WINDOWS.createTarget(["squirrel", "nsis"]), + targets: Platform.WINDOWS.createTarget(["nsis"]), config: { extraMetadata: { version: "3.0.0-beta.2", From d22c0d0d007adc21d50de8ccf430ba2840005d07 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 10 Jan 2022 21:15:22 -0800 Subject: [PATCH 08/15] rebalancing some linux tests --- .github/workflows/test.yaml | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 434ab6025fd..fc3e049fb86 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -15,14 +15,14 @@ on: required: false jobs: - test: + test-linux: runs-on: ubuntu-20.04 strategy: matrix: testFiles: - - ArtifactPublisherTest,RepoSlugTest,binDownloadTest,configurationValidationTest,filenameUtilTest,filesTest,globTest,ignoreTest,macroExpanderTest,mainEntryTest,urlUtilTest + - ArtifactPublisherTest,BuildTest,ExtraBuildTest,RepoSlugTest,binDownloadTest,configurationValidationTest,filenameUtilTest,filesTest,globTest,ignoreTest,macroExpanderTest,mainEntryTest,urlUtilTest - snapTest,debTest,fpmTest,protonTest - - BuildTest,ExtraBuildTest,extraMetadataTest,linuxArchiveTest,linuxPackagerTest,HoistedNodeModuleTest,PublishManagerTest + - extraMetadataTest,linuxArchiveTest,linuxPackagerTest,HoistedNodeModuleTest,PublishManagerTest steps: - name: Checkout code repository uses: actions/checkout@v2 From 516169885fd5bf815b479e17768e769ef6cbdc82 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 10 Jan 2022 21:42:50 -0800 Subject: [PATCH 09/15] Update test.yaml --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index fc3e049fb86..7fca3264afc 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -93,7 +93,7 @@ jobs: strategy: matrix: testFiles: - - installerTest,appxTest,msiTest,portableTest,assistedInstallerTest,squirrelWindowsTest,protonTest + - installerTest,appxTest,msiTest,portableTest,assistedInstallerTest,protonTest - oneClickInstallerTest,nsisUpdaterTest,winCodeSignTest,winPackagerTest,webInstallerTest steps: - name: Checkout code repository From d4e93ef54a6b4a36017f2077594d755262434204 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 10 Jan 2022 21:44:12 -0800 Subject: [PATCH 10/15] Update test.yaml --- .github/workflows/test.yaml | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 7fca3264afc..348ce0c2cc2 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -20,9 +20,8 @@ jobs: strategy: matrix: testFiles: - - ArtifactPublisherTest,BuildTest,ExtraBuildTest,RepoSlugTest,binDownloadTest,configurationValidationTest,filenameUtilTest,filesTest,globTest,ignoreTest,macroExpanderTest,mainEntryTest,urlUtilTest + - ArtifactPublisherTest,BuildTest,ExtraBuildTest,RepoSlugTest,binDownloadTest,configurationValidationTest,filenameUtilTest,filesTest,globTest,ignoreTest,macroExpanderTest,mainEntryTest,urlUtilTest,extraMetadataTest,linuxArchiveTest,linuxPackagerTest,HoistedNodeModuleTest,PublishManagerTest - snapTest,debTest,fpmTest,protonTest - - extraMetadataTest,linuxArchiveTest,linuxPackagerTest,HoistedNodeModuleTest,PublishManagerTest steps: - name: Checkout code repository uses: actions/checkout@v2 From d6f79637532ded46fae2107d0967000e8805d94b Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Mon, 10 Jan 2022 23:12:14 -0800 Subject: [PATCH 11/15] separating key password for windows signing tests. adding retry to nsisUpdaterTest since staging-percentage is flaky --- .github/workflows/test.yaml | 2 +- test/src/updater/nsisUpdaterTest.ts | 3 +++ 2 files changed, 4 insertions(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 348ce0c2cc2..66dcc12ba93 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -113,6 +113,6 @@ jobs: - name: Test run: node ./test/out/helpers/runTests.js env: - CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} + WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} TEST_FILES: ${{ matrix.testFiles }} FORCE_COLOR: 1 diff --git a/test/src/updater/nsisUpdaterTest.ts b/test/src/updater/nsisUpdaterTest.ts index 5dcb09eb814..f4c4b85d430 100644 --- a/test/src/updater/nsisUpdaterTest.ts +++ b/test/src/updater/nsisUpdaterTest.ts @@ -8,6 +8,9 @@ import { assertThat } from "../helpers/fileAssert" import { removeUnstableProperties } from "../helpers/packTester" import { createNsisUpdater, trackEvents, validateDownload, writeUpdateConfig } from "../helpers/updaterTestUtil" +// some tests are flaky +jest.retryTimes(3) + if (process.env.ELECTRON_BUILDER_OFFLINE === "true") { fit("Skip ArtifactPublisherTest suite — ELECTRON_BUILDER_OFFLINE is defined", () => { console.warn("[SKIP] Skip ArtifactPublisherTest suite — ELECTRON_BUILDER_OFFLINE is defined") From 66a9fad27ed808cd2024de8fa5eb81f7488fe8e6 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Tue, 11 Jan 2022 10:05:30 -0800 Subject: [PATCH 12/15] fixing cache paths --- .github/workflows/test.yaml | 10 +++++----- 1 file changed, 5 insertions(+), 5 deletions(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 66dcc12ba93..6a3ba71e7ba 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -74,10 +74,10 @@ jobs: - name: Compile run: pnpm compile - - name: Cache ~/.cache/electron + - name: Cache ~/Library/Caches/electron uses: actions/cache@v2 with: - path: ~/.cache/electron + path: ~/Library/Caches/electron key: v-11.0.0-mac-electron - name: Test @@ -104,15 +104,15 @@ jobs: - name: Compile run: pnpm compile - - name: Cache ~/.cache/electron + - name: Cache ~\AppData\Local\Cache\electron uses: actions/cache@v2 with: - path: $HOMEPATH/.cache/electron + path: ~\AppData\Local\Cache\electron key: v-11.0.0-windows-electron - name: Test run: node ./test/out/helpers/runTests.js env: - WIN_CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} + CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} TEST_FILES: ${{ matrix.testFiles }} FORCE_COLOR: 1 From ab031669e1cba08efac3889982ca3ce85600782f Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Tue, 11 Jan 2022 10:32:12 -0800 Subject: [PATCH 13/15] test Win CSC password --- .github/workflows/test.yaml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index 6a3ba71e7ba..a64d66a8855 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -83,7 +83,7 @@ jobs: - name: Test run: node ./test/out/helpers/runTests.js env: - CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} + CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} TEST_FILES: ${{ matrix.testFiles }} FORCE_COLOR: 1 From 6556131df3439712c74ad578f20f1e23cc535b46 Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Tue, 11 Jan 2022 11:00:58 -0800 Subject: [PATCH 14/15] remove password from env --- .github/workflows/test.yaml | 1 - 1 file changed, 1 deletion(-) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index a64d66a8855..eb3cc98dafb 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -83,7 +83,6 @@ jobs: - name: Test run: node ./test/out/helpers/runTests.js env: - CSC_KEY_PASSWORD: ${{ secrets.WIN_CSC_KEY_PASSWORD }} TEST_FILES: ${{ matrix.testFiles }} FORCE_COLOR: 1 From 70fee86cd707481a60e7968671be6603dcd0f41e Mon Sep 17 00:00:00 2001 From: Mike Maietta Date: Tue, 11 Jan 2022 11:39:43 -0800 Subject: [PATCH 15/15] adding tokens for publisher tests --- .github/workflows/test.yaml | 3 +++ 1 file changed, 3 insertions(+) diff --git a/.github/workflows/test.yaml b/.github/workflows/test.yaml index eb3cc98dafb..966c825b1d1 100644 --- a/.github/workflows/test.yaml +++ b/.github/workflows/test.yaml @@ -113,5 +113,8 @@ jobs: run: node ./test/out/helpers/runTests.js env: CSC_KEY_PASSWORD: ${{ secrets.CSC_KEY_PASSWORD }} + KEYGEN_TOKEN: ${{ secrets.KEYGEN_TOKEN }} + GH_TOKEN: ${{ secrets.GH_TOKEN }} + BITBUCKET_TOKEN: ${{ secrets.BITBUCKET_TOKEN }} TEST_FILES: ${{ matrix.testFiles }} FORCE_COLOR: 1