import ci from 'ci-info' ; import os from 'os' ; export function isRunningOnCiServer ( ) { return ( ci . isCI || isGithubActions ( ) || isLinuxWithoutDisplayServer ( ) || isNow ( ) || isAwsCodeBuild ( ) ) ; } function isGithubActions ( ) { return process . env . GITHUB_ACTIONS !== undefined ; } function isLinuxWithoutDisplayServer ( ) { if ( os . type ( ) !== 'Linux' ) { return false ; } if ( process . env . DISPLAY !== undefined ) { return false ; } if ( process . env . WAYLAND_DISPLAY !== undefined ) { return false ; } return true ; } function isNow ( ) { return ( process . env . NOW !== undefined || process . env . DEPLOYMENT_ID !== undefined ) ; } function isAwsCodeBuild ( ) { return process . env . CODEBUILD_BUILD_NUMBER !== undefined ; }