Skip to content

Commit

Permalink
BC-5468 Remove CYPRESS_ from credentials
Browse files Browse the repository at this point in the history
  • Loading branch information
UzaeirKhan committed Nov 14, 2023
1 parent 9484533 commit f154466
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 13 deletions.
11 changes: 0 additions & 11 deletions .github/workflows/main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -118,13 +118,6 @@ 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 All @@ -137,10 +130,6 @@ jobs:
working-directory: e2e-system-tests
command: npm run ${{ steps.read_variables.outputs.tag }}
browser: chrome
env:
CYPRESS_BRB: $CYPRESS_BRB
CYPRESS_DEFAULT: $CYPRESS_DEFAULT
CYPRESS_NBC: $CYPRESS_NBC

- name: Generate Report
if: always()
Expand Down
9 changes: 7 additions & 2 deletions cypress.config.js
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,13 @@ const preprocessor = require('@badeball/cypress-cucumber-preprocessor')
async function setupNodeEvents (on, config) {
const isCI = config.env.environmentName === 'ci'
if (isCI) {
config.env = {
...config.env
const environmentFilename = `./env_variables/combined_credentials.json`
const settings = require(environmentFilename)
if (settings) {
config.env = {
...config.env,
...settings
}
}
} else {
const environmentName = config.env.environmentName || 'local'
Expand Down

0 comments on commit f154466

Please sign in to comment.