Skip to content

Commit

Permalink
BC-5468 update main yml and cypress config files
Browse files Browse the repository at this point in the history
  • Loading branch information
UzaeirKhan committed Nov 13, 2023
1 parent 036208c commit bf31804
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 3 deletions.
10 changes: 8 additions & 2 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -108,12 +108,14 @@ jobs:
for key in "${!key_value_pairs[@]}"; do
json_output+="\"$key\":\"${key_value_pairs[$key]}\","
done
json_output="${json_output%,}" # Remove the trailing comma
json_output="${json_output%,}"
json_output+="}}"
# Save the combined JSON object to a file
echo "$json_output" > ${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.env.json
# - name: Set credentials as environment variable
# run: echo "CREDENTIALS_JSON=$(jq -c . ${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.env.json)" >> $GITHUB_ENV

- name: Clean up previous report
uses: cypress-io/github-action@v5
with:
Expand All @@ -126,6 +128,10 @@ jobs:
working-directory: e2e-system-tests
command: npm run ${{ steps.read_variables.outputs.tag }}
browser: chrome
env:
CYPRESS_BRB: $(jq -r '.CYPRESS_BRB' "${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.env.json")
CYPRESS_DEFAULT: $(jq -r '.CYPRESS_DEFAULT' "${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.env.json")
CYPRESS_NBC: $(jq -r '.CYPRESS_NBC' "${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.env.json")

- name: Generate Report
if: always()
Expand Down
2 changes: 1 addition & 1 deletion cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -21,7 +21,7 @@ async function setupNodeEvents (on, config) {
}
}
console.log(config.env)
console.log('loaded settings for environment %s', environmentName)
console.log('loaded settings for environment %s', environmentFilename)

// This is required for the preprocessor to be able to generate JSON reports after each run, and more,
await preprocessor.addCucumberPreprocessorPlugin(on, config)
Expand Down

0 comments on commit bf31804

Please sign in to comment.