[英]Gitlab CI/CD - How to know when a process has finished
我試圖在編譯 Angular 項目后開始測試。 問題是當項目最終編譯時,進程仍然存在( ng serve
),所以測試沒有開始。 (我使用 cypress 進行測試,)我做過的最好的工作是在同一階段同時完成兩項工作,一個手動暫停等待另一個完成。 但我的最終目標是以某種方式使其自動化。
這是代碼:
image: node:12.20
cache:
paths:
- node_modules/
stages:
- test
job-prepare:
stage: test
script:
- node -v
- npm -v
- npm i
- npm install -g @angular/cli@9.0.6
- ng version
- npm run serve:windows
job-test:
stage: test
script:
- npm run e2e
when: manual
allow_failure: false
謝謝
為什么不通過將編譯放入before_script
和 test inside script
只使用before_script
和script
的一項工作?
https://docs.gitlab.com/12.10/ee/ci/yaml/#before_script-and-after_script
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.