简体   繁体   English

R covr包不起作用

[英]R covr package does not work

I try to test code coverage of my R package. 我尝试测试我的R包的代码覆盖率。 However, after Travis-CI build succeeds, it shows an error message that the R package I test does not contain covr package as follow: Error: '/home/travis/build/tzuliu/ooc' does not contain a package! Execution halted 但是,在Travis-CI构建成功后,它显示一条错误消息,说明我测试的R软件包不包含covr软件包,如下所示: Error: '/home/travis/build/tzuliu/ooc' does not contain a package! Execution halted Error: '/home/travis/build/tzuliu/ooc' does not contain a package! Execution halted

I have tried several instructions, such as this instruction or this instruction . 我已经尝试了几条指令,例如这条指令这条指令 However, it still fails. 但是,它仍然失败。

My Travis yml file is as follows: 我的Travis yml文件如下:

sudo: false
language: r
cache: packages
install:
 - Rscript -e 'install.packages(c("devtools","roxygen2","testthat"));devtools::install_deps("ooc")'
script:
 - Rscript -e 'devtools::check("ooc")'
r_packages:
 - covr  
r_github_packages:
 - r-lib/covr
after_success:
 - Rscript -e 'covr::codecov()'

Can anybody help identify where the issue is? 有人可以帮助您确定问题出在哪里吗?

Note: The system is OSX and I have followed the instruction to revise DESCRIPTION . 注意:系统是OSX,我已按照说明修改了DESCRIPTION

以此替换最后一行

- Rscript -e 'covr::codecov(<path to the R-package>)'

声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM