Skip to content

Instantly share code, notes, and snippets.

@desaijay315
Last active September 14, 2021 11:19
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save desaijay315/a73765b3056e930253283a32262d9673 to your computer and use it in GitHub Desktop.
Save desaijay315/a73765b3056e930253283a32262d9673 to your computer and use it in GitHub Desktop.
//We're running the npm-run-all package to run the scripts independently for TDD/BDD test cases without dockerization and can help in to CI pipelines without overhead of getting all the scripts running sequentially or serially.
//This will parallely execute all the test-scripts files
"app-one": "cypress open --env configFile=script-one.local.json, isCI=false --config video=false"
"app-two": "cypress open --env configFile=script-two.local.json, isCI=false --config video=false"
"app-three": "cypress open --env configFile=script-three.local.json, isCI=false --config video=false"
"run-all-scripts-parallel": "npm-run-all --parallel app-two app-three"
@desaijay315
Copy link
Author

//production rules

"app-one": "cypress run --env configFile=script-one.local.json, isCI=true --config video=false"
"app-two": "cypress run --env configFile=script-two.local.json, isCI=true --config video=false"
"app-three": "cypress run --env configFile=script-three.local.json, isCI=true --config video=false"
"run-all-scripts-parallel": "npm-run-all --parallel app-two app-three"

@desaijay315
Copy link
Author

@desaijay315
Copy link
Author

const isCI = require('is-ci')

if (isCI) {
console.log('The code is running on a CI server')
}

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment