florianhartig / DHARMa

Diagnostics for HierArchical Regession Models
http://florianhartig.github.io/DHARMa/
201 stars 21 forks source link

Update / resolve GH action standard test workflow #366

Closed florianhartig closed 1 year ago

florianhartig commented 1 year ago

Warning: r-lib/actions/setup-r@v1 is deprecated. Please update your workflow to use the 'v2' version. Also look at the examples at https://github.com/r-lib/actions/tree/v2/examples because '@v2' workflows are much simpler than 'v1' workflows.

https://github.com/r-lib/actions

florianhartig commented 1 year ago

Additional problem:

* creating vignettes ... ERROR
[21](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:22)
Error: --- re-building ‘DHARMa.Rmd’ using rmarkdown
[22](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:23)
Warning in system2(..., stdout = if (use_file_stdout()) f1 else FALSE, stderr = f2) :
[23](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:24)
  error in running command
[24](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:25)
! sh: pdflatex: command not found
[25](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:26)
Error: Error: processing vignette 'DHARMa.Rmd' failed with diagnostics:
[26](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:27)
LaTeX failed to compile /private/var/folders/24/8k48jl6d249_n_qfxwsl6xvm0000gn/T/RtmpSQGXTu/Rbuildb3f12e0afe39/DHARMa/vignettes/DHARMa.tex. See https://yihui.org/tinytex/r/#debugging for debugging tips. See DHARMa.log for more info.
[27](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:28)
--- failed re-building ‘DHARMa.Rmd’
[28](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:29)
--- re-building ‘DHARMaForBayesians.Rmd’ using rmarkdown
[29](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:30)
--- finished re-building ‘DHARMaForBayesians.Rmd’
[30](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:31)
SUMMARY: processing the following file failed:
[31](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:32)
  ‘DHARMa.Rmd’
[32](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:33)
Error: Error: Vignette re-building failed.
[33](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:34)
Execution halted
[34](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:35)
Error: Error in proc$get_built_file() : Build process failed
[35](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:36)
Calls: <Anonymous> ... build_package -> with_envvar -> force -> <Anonymous>
[36](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:37)
Execution halted
[37](https://github.com/florianhartig/DHARMa/actions/runs/4026897407/jobs/6921966834#step:9:38)
Error: Process completed with exit code 1.
florianhartig commented 1 year ago

OK, it seems what did the trick to solve the problem with building the vignette was adding

      - uses: r-lib/actions/setup-tinytex@v2
       - run: tlmgr --version

The actions are now also updated!

      - uses: actions/checkout@v3

      - uses: r-lib/actions/setup-r@v2
        with:
          r-version: ${{ matrix.config.r }}

      - uses: r-lib/actions/setup-pandoc@v2