Add launcher catalog workflow and smoke tests
This commit is contained in:
24
scripts/smoke-runner.js
Normal file
24
scripts/smoke-runner.js
Normal file
@@ -0,0 +1,24 @@
|
||||
const { spawn } = require('child_process')
|
||||
const electronBinary = require('electron')
|
||||
|
||||
const electronArgs = ['.']
|
||||
|
||||
if(process.platform === 'linux'){
|
||||
electronArgs.push('--no-sandbox', '--disable-gpu')
|
||||
}
|
||||
|
||||
const child = spawn(electronBinary, electronArgs, {
|
||||
stdio: 'inherit',
|
||||
env: {
|
||||
...process.env,
|
||||
LAUNCHER_SMOKE_EXIT: '1',
|
||||
LAUNCHER_SMOKE_EXIT_DELAY_MS: process.env.LAUNCHER_SMOKE_EXIT_DELAY_MS || '5000'
|
||||
}
|
||||
})
|
||||
|
||||
child.on('exit', (code, signal) => {
|
||||
if(signal != null){
|
||||
process.exit(1)
|
||||
}
|
||||
process.exit(code ?? 0)
|
||||
})
|
||||
Reference in New Issue
Block a user