Skip to content

Commit

Permalink
Add force_install input to bypass caching
Browse files Browse the repository at this point in the history
  • Loading branch information
HDash committed Nov 5, 2024
1 parent 403ce3e commit f4f96ef
Show file tree
Hide file tree
Showing 2 changed files with 66 additions and 2 deletions.
57 changes: 57 additions & 0 deletions .github/workflows/rworkflows_force_install.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,57 @@
name: rworkflows
'on':
push:
branches:
- master
- main
- devel
- RELEASE_**
pull_request:
branches:
- master
- main
- devel
- RELEASE_**
jobs:
rworkflows:
permissions: write-all
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
container: ${{ matrix.config.cont }}
strategy:
fail-fast: ${{ false }}
matrix:
config:
- os: ubuntu-latest
r: auto
bioc: release
cont: ghcr.io/bioconductor/bioconductor_docker:RELEASE_3_19
python-version: 3.11
- os: macOS-latest
r: latest
bioc: release
python-version: 3.11
- os: windows-latest
r: latest
bioc: release
python-version: 3.11
steps:
- uses: neurogenomics/rworkflows@master
with:
run_bioccheck: ${{ false }}
run_rcmdcheck: ${{ true }}
as_cran: ${{ true }}
run_vignettes: ${{ true }}
has_testthat: ${{ true }}
run_covr: ${{ false }}
run_pkgdown: ${{ false }}
has_runit: ${{ false }}
# has_latex: ${{ true }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
run_docker: ${{ false }}
DOCKER_TOKEN: ${{ secrets.DOCKER_TOKEN }}
runner_os: ${{ runner.os }}
cache_version: cache-v1
force_install: ${{ true }}
# free_diskspace: ${{ true }}
# miniforge_variant: false
11 changes: 9 additions & 2 deletions action.yml
Original file line number Diff line number Diff line change
Expand Up @@ -169,6 +169,13 @@ inputs:
Whether to run the workflow telemetry action:
https://github.com/catchpoint/workflow-telemetry-action
default: true
force_install:
description: >
Whether to force install packages. If `true`, all packages will be
reinstalled, bypassing the cache.
Recommended to set to `true` when pushing changes without updating R
package version, such as during pre-release phase of developement.
default: false

runs:
using: 'composite'
Expand Down Expand Up @@ -342,7 +349,7 @@ runs:
install.packages(c("rmarkdown","BiocManager"), dependencies = TRUE)
message(paste('****', Sys.time(), 'pass number 1 at installing dependencies****'))
repos <- BiocManager::repositories()
remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=FALSE)
remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=${{ inputs.force_install }})
continue-on-error: true
shell: Rscript {0}

Expand All @@ -354,7 +361,7 @@ runs:
options(crayon.enabled = TRUE, timeout=Sys.getenv("timeout"))
message(paste('****', Sys.time(), 'pass number 2 at installing dependencies****'))
repos <- BiocManager::repositories()
remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=FALSE)
remotes::install_local(repos=repos, dependencies=TRUE, build_vignettes=FALSE, upgrade=TRUE, force=${{ inputs.force_install }})
shell: Rscript {0}

- name: 🛠 Install RUnit (via BiocGenerics)
Expand Down

0 comments on commit f4f96ef

Please sign in to comment.