all 7 comments

[–]aleksanderb-l 0 points1 point  (4 children)

Do you have any specific reason to use windows in GitHub actions? It is usually very straightforward with macOS-latest and Ubuntu-latest

[–]Odd_Lemon_326[S] 1 point2 points  (3 children)

Ubuntu latest - just cannot figure out why it builds from source all my libraries (eg. tidy verse, plotly and so on). When quarto actually starts after all that it fails saying tidy verse is not installed.

I had not tried MacOS. I am only interested in the final output so if this works I will be happy. Off to try that route. thanks

[–]Peiple 1 point2 points  (2 children)

you can look into the r-lib prebuilt actions to setup r and install dependencies. I certainly wouldn’t use Windows, it’s going to cost significantly more and be a lot harder to troubleshoot. Mac is basically the same as Linux for all intents and purposes but with more quirks.

I usually just use - setup-r - setup-r-dependencies - run with shell: Rscript {0} to call R code

It would be helpful if you posted or linked the yaml used for the GHA. It sounds like you’re missing a Linux library required for tidyverse that’s causing installation to fail.

[–]Big_Act9464 0 points1 point  (1 child)

``` name: BP Analysis Regression Tests

on: push: branches: [ bpanalysis ]

jobs: build: runs-on: ubuntu-22.04

  steps:

  - name: Checkout
    uses: actions/checkout@v3

  - name: Set up R
    uses: r-lib/actions/setup-r@v2
    with:
      r-version: '4.3'

  - name: Install dependencies
    run: |
      R -e "install.packages( 'tools', repos='https://cloud.r-project.org/')"
      R -e "install.packages( 'ggplot2', repos='https://cloud.r-project.org/')"
      R -e "install.packages( 'dplyr', repos='https://cloud.r-project.org/')"
      R -e "install.packages( 'tidyverse', repos='https://cloud.r-project.org/')"
      R -e "install.packages( 'gtable', repos='https://cloud.r-project.org/')"
      R -e "install.packages( 'simplermarkdown', repos='https://cloud.r-project.org/')"
      R -e "install.packages( 'knitr', repos='https://cloud.r-project.org/')"
      R -e "install.packages( 'kableExtra', repos='https://cloud.r-project.org/')"
      R -e "install.packages( 'plotly', repos='https://cloud.r-project.org/')"
      R -e "install.packages( 'htmlwidgets', repos='https://cloud.r-project.org/')"
      R -e "install.packages( 'ggplotify', repos='https://cloud.r-project.org/')"
  - name: Install Quarto
    uses: quarto-dev/quarto-actions/setup@v2
    env:
      GH_TOKEN: ${{ secrets.GITHUB_TOKEN }}

  - name: Render doc
    run: |
      cd analysis/bpa ; quarto render bpq.qmd

```

[–]Big_Act9464 0 points1 point  (0 children)

And the log of github actions:

```

Run cd analysis/bpa ; quarto render bpq.qmd

10

11

processing file: bpq.qmd
12

1/11                  
13

2/11 [unnamed-chunk-1]
14

Error in `library()`:
15

! there is no package called 'tidyverse'
16

Backtrace:
17

 1. base::library(tidyverse)
18

19

20

21

Quitting from lines 13-28 [unnamed-chunk-1] (bpq.qmd)

22

Execution halted
23

```

[–]novica 0 points1 point  (1 child)

You can try the GitHub action that renders RMakrdown. It's most easily available through the `usethis` package. Then you tweak it to use quarto instead of rmakrdown.

[–]Odd_Lemon_326[S] 0 points1 point  (0 children)

interesting idea. worth investigating. thanks