我正在开发一个 cypress 项目。我已经在 GitLab 中设置了管道。我的应用程序只能在通过 Open VPN 连接的专用网络上运行。
有人可以指导我如何将其添加到 .gitlab-ci.yml 文件中吗???
我的 .gitlab-ci.yml 是:
image: cypress/base:10
stages:
- test
test:
stage: test
script:
- npm install
- npm run test
Run Code Online (Sandbox Code Playgroud)
我的package.json如下:
{
"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": …Run Code Online (Sandbox Code Playgroud) javascript openvpn gitlab-ci cypress cypress-cucumber-preprocessor