From dc1b6afb58b649d1b0c9e69fb2da8f1d67d212e2 Mon Sep 17 00:00:00 2001 From: Uzaeir Khan Date: Mon, 13 Nov 2023 17:48:35 +0100 Subject: [PATCH] BC-5468 update cypress confif and yml file --- .github/workflows/main.yml | 10 +++++----- cypress.config.js | 5 ++++- 2 files changed, 9 insertions(+), 6 deletions(-) diff --git a/.github/workflows/main.yml b/.github/workflows/main.yml index 015a9deb..f62083dd 100644 --- a/.github/workflows/main.yml +++ b/.github/workflows/main.yml @@ -111,12 +111,12 @@ jobs: json_output="${json_output%,}" json_output+="}" - echo "$json_output" > ${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.env.json + echo "$json_output" > ${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.json - while IFS="=" read -r key value; do - echo "Setting $key" - echo "$key=$value" >> $GITHUB_ENV - done < <(jq -r 'to_entries | .[] | .key + "=" + .value' "${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.env.json") + # while IFS="=" read -r key value; do + # echo "Setting $key" + # echo "$key=$value" >> $GITHUB_ENV + # done < <(jq -r 'to_entries | .[] | .key + "=" + .value' "${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.json") - name: Clean up previous report uses: cypress-io/github-action@v5 diff --git a/cypress.config.js b/cypress.config.js index 97ce5c13..b0c9fd46 100644 --- a/cypress.config.js +++ b/cypress.config.js @@ -5,8 +5,11 @@ const preprocessor = require('@badeball/cypress-cucumber-preprocessor') async function setupNodeEvents (on, config) { const isCI = config.env.environmentName === 'ci' if (isCI) { + const environmentFilename = `./env_variables/combined_credentials.json` + const settings = require(environmentFilename) config.env = { - ...config.env + ...config.env, + ...settings } } else { const environmentName = config.env.environmentName || 'local'