Add automated checks for desktop app runtime #233
- Add automation script for building, packaging, installing, executing and verifying Electron distrubtions across macOS, Ubuntu and Windows. - Add GitHub workflow to run the script to test distributions using the script. - Update README with new workflow status badge. - Add application initialization log to desktop applications to be able to test against crashes before application initialization.
This commit is contained in:
@@ -26,10 +26,7 @@ protocol.registerSchemesAsPrivileged([
|
||||
{ scheme: 'app', privileges: { secure: true, standard: true } },
|
||||
]);
|
||||
|
||||
log.transports.file.level = 'silly';
|
||||
if (!process.env.IS_TEST) {
|
||||
Object.assign(console, log.functions); // override console.log, console.warn etc.
|
||||
}
|
||||
setupLogger();
|
||||
|
||||
function createWindow() {
|
||||
// Create the browser window.
|
||||
@@ -131,6 +128,9 @@ function loadApplication(window: BrowserWindow) {
|
||||
const updater = setupAutoUpdater();
|
||||
updater.checkForUpdates();
|
||||
}
|
||||
// Do not remove [APP_INIT_SUCCESS]; it's a marker used in tests to verify
|
||||
// app initialization.
|
||||
log.info('[APP_INIT_SUCCESS] Main window initialized and content loading.');
|
||||
}
|
||||
|
||||
function configureExternalsUrlsOpenBrowser(window: BrowserWindow) {
|
||||
@@ -155,3 +155,10 @@ function getWindowSize(idealWidth: number, idealHeight: number) {
|
||||
height = Math.min(height, idealHeight);
|
||||
return { width, height };
|
||||
}
|
||||
|
||||
function setupLogger(): void {
|
||||
log.transports.file.level = 'silly';
|
||||
if (!process.env.IS_TEST) {
|
||||
Object.assign(console, log.functions); // override console.log, console.warn etc.
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user