I am working on a cypress project. I have set up a pipeline in GitLab. My application only works over private network connected via Open VPN.
Can some one guide me how to add that in .gitlab-ci.yml file ???
My .gitlab-ci.yml is :
image: cypress/base:10
stages:
- test
test:
stage: test
script:
- npm install
- npm run test
and my package.json is as follows:
{
"name": "cypresspackage",
"version": "1.0.0",
"description": "",
"main": "index.js",
"scripts": {
"clean:reports": "rm -R -f cypress/reports && mkdir cypress/reports && mkdir cypress/reports/mochareports",
"pretest": "npm run clean:reports",
"scripts": "cypress run --spec cypress/integration/dummy.feature",
"combine-reports": "mochawesome-merge ./cypress/reports/mocha/*.json > cypress/reports/mochareports/report.json",
"generate-report": "marge cypress/reports/mochareports/report.json -f report -o cypress/reports/mochareports",
"report:copyScreenshots": "cp -r cypress/screenshots cypress/reports/mochareports/assets",
"posttest": "npm run report:copyScreenshots && npm run combine-reports && npm run generate-report",
"test": "npm run scripts || npm run posttest"
},
"author": "",
"license": "ISC",
"devDependencies": {
"cypress": "^6.3.0",
"cypress-audit": "^0.3.0",
"cypress-cucumber-preprocessor": "^4.0.1",
"cypress-multi-reporters": "^1.4.0",
"cypress-xpath": "^1.6.2",
"mocha": "^8.2.1",
"mochawesome": "^6.2.1",
"mochawesome-merge": "^4.2.0",
"mochawesome-report-generator": "^5.1.0"
},
"dependencies": {
"lambdatest-cypress-cli": "^1.0.1"
},
"cypress-cucumber-preprocessor": {
"nonGlobalStepDefinitions": true
}
}