Skip to content

Commit 8c32f97

Browse files
committed
using BiocManager in GHA
1 parent c038bce commit 8c32f97

File tree

1 file changed

+15
-8
lines changed

1 file changed

+15
-8
lines changed

.github/workflows/basic_checks.yaml

Lines changed: 15 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -28,20 +28,29 @@ jobs:
2828
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
2929
sudo -s eval "$sysreqs"
3030
31+
# Change: This step is now more robust. It uses BiocManager to install
32+
# dependencies before installing the local package.
3133
- name: Install dependencies
32-
# Change: Add the GH_PAT secret as an environment variable
33-
env:
34-
GITHUB_PAT: ${{ secrets.GH_PAT }}
3534
run: |
3635
options(repos = c(CRAN = "https://cloud.r-project.org"))
37-
remotes::install_local(dependencies = TRUE, repos = BiocManager::repositories(), build_vignettes = TRUE, upgrade = TRUE)
38-
BiocManager::install("rcmdcheck", update = TRUE, ask = FALSE)
36+
install.packages("remotes")
37+
38+
# Get all dependencies from the DESCRIPTION file
39+
deps <- remotes::dev_package_deps(dependencies = TRUE)
40+
41+
# Use the robust BiocManager installer to handle all dependencies
42+
BiocManager::install(deps$package, update = FALSE, ask = FALSE)
43+
44+
# Install the local package itself (dependencies are already installed)
45+
remotes::install_local(dependencies = FALSE)
46+
47+
# Install rcmdcheck separately
48+
BiocManager::install("rcmdcheck", update = FALSE, ask = FALSE)
3949
shell: Rscript {0}
4050

4151
- name: Check
4252
env:
4353
_R_CHECK_CRAN_INCOMING_REMOTE_: false
44-
GITHUB_PAT: ${{ secrets.GH_PAT }} # Also add here if check step accesses private repos
4554
run: rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "error", check_dir = "check")
4655
shell: Rscript {0}
4756

@@ -55,8 +64,6 @@ jobs:
5564
tags: latest
5665

5766
- name: Build pkgdown
58-
env:
59-
GITHUB_PAT: ${{ secrets.GH_PAT }} # Also add here for pkgdown
6067
run: |
6168
PATH=$PATH:$HOME/bin/ Rscript -e 'pkgdown::build_site(".")'
6269

0 commit comments

Comments
 (0)