diff --git a/.github/workflows/test-ios.yml b/.github/workflows/test-ios.yml index 4066d51..fb42f34 100644 --- a/.github/workflows/test-ios.yml +++ b/.github/workflows/test-ios.yml @@ -25,6 +25,6 @@ jobs: - name: Set .env file env: ENV_TEST_FILE: ${{ secrets.ENV_TEST_FILE }} - run: echo $ENV_TEST_FILE > testapp/.env + run: echo "$ENV_TEST_FILE" > testapp/.env - name: Run iOS Tests run: npm run buildAndRunCordovaIosTests \ No newline at end of file diff --git a/testapp-cordova/gulpfile.js b/testapp-cordova/gulpfile.js index 3f72eb8..3a92c2c 100644 --- a/testapp-cordova/gulpfile.js +++ b/testapp-cordova/gulpfile.js @@ -31,15 +31,16 @@ class Platform { ` // parse environment configuration -const getEnvConfig = dotenv.parse(fs.readFileSync(`${rnTestAppDir}/.env`)) -const envConfig = `const EnvConfig = ${JSON.stringify(getEnvConfig)};` +const envConfig = dotenv.parse(fs.readFileSync(`${rnTestAppDir}/.env`)) +console.log(`Reading env config env with pa server ${envConfig.POWERAUTH_SERVER_URL} and enrollment server ${envConfig.ENROLLMENT_SERVER_URL}`) +const envConfigStr = `const EnvConfig = ${JSON.stringify(envConfig)};` const copyTestFiles = () => gulp .src([`${rnTestAppDir}/src/testbed/**/**.ts`, `${rnTestAppDir}/src/Config.ts`, `${rnTestAppDir}/_tests/**/**.ts`], { base: rnTestAppDir }) .pipe(replace(/import {[a-zA-Z }\n,]+from "react-native-powerauth-mobile-sdk";/g, '')) .pipe(replace('import { Platform } from "react-native";', platformClass)) - .pipe(replace('import { Config as EnvConfig } from "react-native-config";', envConfig)) + .pipe(replace('import { Config as EnvConfig } from "react-native-config";', envConfigStr)) .pipe(gulp.dest(tempDir)); const copyAppFiles = () =>