Skip to content

Commit

Permalink
BC-5468 update cypress confif and yml file
Browse files Browse the repository at this point in the history
  • Loading branch information
UzaeirKhan committed Nov 13, 2023
1 parent 9e301b3 commit dc1b6af
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 6 deletions.
10 changes: 5 additions & 5 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
5 changes: 4 additions & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -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'
Expand Down

0 comments on commit dc1b6af

Please sign in to comment.