1

私はヒノキのプロジェクトに取り組んでいます。GitLab でパイプラインをセットアップしました。私のアプリケーションは、Open VPN 経由で接続されたプライベート ネットワーク上でのみ動作します。

それを.gitlab-ci.ymlファイルに追加する方法を教えてもらえますか???

私の .gitlab-ci.yml は次のとおりです。

image: cypress/base:10

stages:
  - test
test:
  stage: test
  script:
    - npm install
    - npm run test

私の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": "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
  }
}
4

1 に答える 1