For my cypress tests in my Circleci CI/CD pipeline, how can I call the command cy:test-flight given under scripts section in Package.json file from .cirlceci/config.yml. Also I would like to set following parameters record true and parallel set to 3. Could someone please advise on how to achieve this using .cirlceci/config.yml
Package.json
"scripts": {
"cy:run": "cypress run",
"get-token-flight": "node get-token.js && mv tokenData.json cypress/fixtures && mv cookies.json cypress/fixtures",
"cy:open:flight": "npm run get-token-flight && cypress open",
"cy:test-flight": "set CYPRESS_RETRIES=2 && npm run get-token-flight && cypress run --record --key <key-here> cypress --env configFile=flight-app --browser chrome"
}
.cirlceci/config.yml
version: 2.1
orbs:
cypress: cypress-io/cypress@1
workflows:
build:
jobs:
- cypress/install
- cypress/run