Skip to content

Commit 1eb9e51

Browse files
committed
tests - correctly install dev version of rmarkdown and knitr
1 parent 2d8e18c commit 1eb9e51

File tree

3 files changed

+6
-6
lines changed

3 files changed

+6
-6
lines changed

.github/workflows/test-smokes.yml

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -130,8 +130,8 @@ jobs:
130130
renv::restore()
131131
# Install dev versions for our testing
132132
# Use r-universe to avoid github api calls
133-
try(install.packages('knitr', repos = 'https://yihui.r-universe.dev'))
134-
try(install.packages('rmarkdown', repos = 'https://rstudio.r-universe.dev'))
133+
try(install.packages('rmarkdown', repos = c('https://rstudio.r-universe.dev', getOption('repos'))))
134+
try(install.packages('knitr', repos = c('https://yihui.r-universe.dev', getOption('repos'))))
135135
if ('${{ inputs.extra-r-packages }}' != '') {
136136
cat(sprintf("::notice::Running with the following extra R packages for pak: %s\n", "${{ inputs.extra-r-packages }}"))
137137
renv::install(strsplit("${{ inputs.extra-r-packages }}", split = ",")[[1]])

tests/configure-test-env.ps1

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -8,8 +8,8 @@ If ($r) {
88
Write-Host -ForegroundColor green " > Restoring renv project"
99
Rscript -e 'renv::restore()'
1010
Write-Host -ForegroundColor green " > Installing dev knitr and rmarkdown"
11-
Rscript -e "install.packages('rmarkdown', repos = c('https://rstudio.r-universe.dev'))"
12-
Rscript -e "install.packages('knitr', repos = c('https://yihui.r-universe.dev'))"
11+
Rscript -e "install.packages('rmarkdown', repos = c('https://rstudio.r-universe.dev', getOption('repos')))"
12+
Rscript -e "install.packages('knitr', repos = c('https://yihui.r-universe.dev', getOption('repos')))"
1313
}
1414

1515
# Check python test environment ---

tests/configure-test-env.sh

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -10,8 +10,8 @@ else
1010
echo " > Restoring renv project"
1111
Rscript -e 'renv::restore()'
1212
echo " > Installing dev knitr and rmarkdown"
13-
Rscript -e "install.packages('rmarkdown', repos = c('https://rstudio.r-universe.dev'))"
14-
Rscript -e "install.packages('knitr', repos = c('https://yihui.r-universe.dev'))"
13+
Rscript -e "install.packages('rmarkdown', repos = c('https://rstudio.r-universe.dev', getOption('repos')))"
14+
Rscript -e "install.packages('knitr', repos = c('https://yihui.r-universe.dev', getOption('repos')))"
1515
fi
1616

1717

0 commit comments

Comments
 (0)