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 dc1b6af commit 8b45435
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 4 deletions.
7 changes: 7 additions & 0 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,6 +118,13 @@ jobs:
# echo "$key=$value" >> $GITHUB_ENV
# done < <(jq -r 'to_entries | .[] | .key + "=" + .value' "${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.json")
- name: Set environment variables from JSON file
run: |
json_file_path="${{ github.workspace }}/e2e-system-tests/env_variables/combined_credentials.json"
export CYPRESS_BRB=$(jq -r '.CYPRESS_BRB' "$json_file_path")
export CYPRESS_DEFAULT=$(jq -r '.CYPRESS_DEFAULT' "$json_file_path")
export CYPRESS_NBC=$(jq -r '.CYPRESS_NBC' "$json_file_path")
- name: Clean up previous report
uses: cypress-io/github-action@v5
with:
Expand Down
5 changes: 1 addition & 4 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,11 +5,8 @@ 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,
...settings
...config.env
}
} else {
const environmentName = config.env.environmentName || 'local'
Expand Down

0 comments on commit 8b45435

Please sign in to comment.