Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Testthat error in test-coverage workflow #320

Closed
pakjiddat opened this issue Jun 15, 2021 · 3 comments
Closed

Testthat error in test-coverage workflow #320

pakjiddat opened this issue Jun 15, 2021 · 3 comments
Labels
bug an unexpected problem or unintended behavior

Comments

@pakjiddat
Copy link

pakjiddat commented Jun 15, 2021

The covr::codecov() calls gives the following error:

Screenshot from 2021-06-15 12-14-42

See attached log file.
logs_103.zip

As I understand covr::codecov() runs all the test cases using testthat. The error message suggests there is a problem with running the testthat test cases.

I checked the test cases in my package and the problem seems to be caused by the following function call:

sfp <- system.file("extdata", fn, package = "wordpredictor")

The file name given by fn cannot be found. The function returns an empty string. The command: covr::codecov() works on my local computer without problems.

I replaced the command covr:codecov() with covr::codecov(quiet = F, clean = F, type = "all") in test-coverage.yaml. It should run all tests, examples and vignettes. Running the workflow resulted in the following error:

> tools::buildVignettes(dir = '/Users/runner/work/word-predictor/word-predictor')
--- re-building ‘features.Rmd’ using rmarkdown
Quitting from lines 63-82 (features.Rmd) 
Error: Error: processing vignette 'features.Rmd' failed with diagnostics:
no file found
--- failed re-building ‘features.Rmd’

See the attached log file.
logs_107.zip

The error suggests a problem with file/folder permissions.

@pakjiddat pakjiddat added the bug an unexpected problem or unintended behavior label Jun 15, 2021
@jimhester
Copy link
Member

As mentioned in #319 (comment) your vignettes are broken.

If you continue to have issues along this line please open them at community.rstudio.com, this issue tracker is only for issues in the custom actions themselves, not general help with debugging workflows.

@pakjiddat
Copy link
Author

pakjiddat commented Jun 16, 2021

I managed to fix the problem. The problem was related to #319. I had added inst/extdata folder to .gitignore. So the files were not added to the GitHub repo. I removed the inst/extdata entry from .gitignore and committed the changes. After that the test-coverage workflow ran without problems. Thanks for your help !.

I had posted this issue with the check-release workflow at community.rstudio.com, three days ago. But have not yet received a reply.

@github-actions
Copy link

github-actions bot commented Nov 6, 2022

This issue has been automatically locked. If you believe you have found a related problem, please file a new issue and include a link to this issue

@github-actions github-actions bot locked as resolved and limited conversation to collaborators Nov 6, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
bug an unexpected problem or unintended behavior
Projects
None yet
Development

No branches or pull requests

2 participants