[英]I have defined a vector according to a certain rule. How do I define a function that outputs the vector?
[英]How do define certain tests on certain branches?
我是 gitlab ci/cd 的新手。 我喜歡它的工作方式。 我想在某些分支中運行某些測試。 如何在 yml 文件中定義相同的內容?
I am using gitlab ci/cd for R package development and using testthat package for unit-testing.
您需要考慮如何在您的分支中構建您的測試套件。
例如,您可以將 test-suite 命名為/tests/branch_1/
並且您的分支的名稱為branch_1
,然后
test_job:
script:
- test_dir("inst/tests/${CI_COMMIT_REF_NAME}"
其中$CI_COMMIT_REF_NAME
是您的分支或標簽名稱,根據gitlab 預定義變量 doc ,將執行與您的分支名稱相同的名稱的測試套件。
聲明:本站的技術帖子網頁,遵循CC BY-SA 4.0協議,如果您需要轉載,請注明本站網址或者原文地址。任何問題請咨詢:yoyou2525@163.com.