@@ -92,6 +92,13 @@ define(function (require, exports, module) {
9292 return utilsConnector . execPeer ( "_npmInstallInFolder" , { moduleNativeDir} ) ;
9393 }
9494
95+ async function getEnvironmentVariable ( varName ) {
96+ if ( ! Phoenix . isNativeApp ) {
97+ throw new Error ( "getEnvironmentVariable not available in browser" ) ;
98+ }
99+ return utilsConnector . execPeer ( "getEnvironmentVariable" , varName ) ;
100+ }
101+
95102 async function ESLintFile ( text , fullFilePath , projectFullPath ) {
96103 if ( ! Phoenix . isNativeApp ) {
97104 throw new Error ( "ESLintFile not available in browser" ) ;
@@ -109,6 +116,25 @@ define(function (require, exports, module) {
109116 _updateNodeLocaleStrings ( ) ;
110117 }
111118
119+ try {
120+ if ( Phoenix . isTestWindow ) {
121+ if ( Phoenix . isNativeApp ) {
122+ async function _setIsTestWindowGitHubActions ( ) {
123+ const actionsEnv = await utilsConnector . execPeer ( "getEnvironmentVariable" , "GITHUB_ACTIONS" ) ;
124+ Phoenix . isTestWindowGitHubActions = ! ! actionsEnv ;
125+ }
126+ _setIsTestWindowGitHubActions ( ) . catch ( e => {
127+ console . error ( "Error setting Phoenix.isTestWindowGitHubActions" , e ) ;
128+ } ) ;
129+ } else {
130+ const urlSearchParams = new window . URLSearchParams ( window . location . search || "" ) ;
131+ Phoenix . isTestWindowGitHubActions = urlSearchParams . get ( "isTestWindowGitHubActions" ) === "yes" ;
132+ }
133+ }
134+ } catch ( e ) {
135+ console . error ( "Error setting Phoenix.isTestWindowGitHubActions" , e ) ;
136+ }
137+
112138 // private apis
113139 exports . _loadNodeExtensionModule = _loadNodeExtensionModule ;
114140 exports . _npmInstallInFolder = _npmInstallInFolder ;
@@ -119,6 +145,7 @@ define(function (require, exports, module) {
119145 exports . getLinuxOSFlavorName = getLinuxOSFlavorName ;
120146 exports . openUrlInBrowser = openUrlInBrowser ;
121147 exports . ESLintFile = ESLintFile ;
148+ exports . getEnvironmentVariable = getEnvironmentVariable ;
122149 exports . isNodeReady = NodeConnector . isNodeReady ;
123150
124151 window . NodeUtils = exports ;
0 commit comments