Skip to content

Merge branch 'dev' into staging #33

Merge branch 'dev' into staging

Merge branch 'dev' into staging #33

# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
on:
push:
branches: [ staging ]
schedule:
- cron: '0 0 * * 0' # Run at midnight every Sunday
workflow_dispatch: # Allow manual trigger
name: STAGING final checks
permissions:
contents: read
packages: read
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
- {os: macos-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
R_KEEP_PKG_SOURCE: yes
steps:
- uses: actions/checkout@v4
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: false # use standard CRAN
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck
needs: check
- name: Install reticulate and create miniconda
run: |
Rscript -e "options(repos = c(CRAN = 'https://cran.r-project.org')); install.packages(c('reticulate', 'pdflatex'))"
Rscript -e "reticulate::install_miniconda()"
Rscript -e "reticulate::conda_create('r-reticulate')"
Rscript -e "reticulate::conda_install(packages = 'scipy', envname = 'r-reticulate')"
# Get the Python path and set environment variable
PYTHON_PATH=$(Rscript -e "cat(reticulate::conda_python('r-reticulate'))")
echo "RETICULATE_PYTHON=$PYTHON_PATH" >> $GITHUB_ENV
# Print debug info
echo "Python path: $PYTHON_PATH"
Rscript -e "cat('Conda environments:\n'); print(reticulate::conda_list())"
shell: bash
- name: Run rcmdcheck
run: |
Rscript -e "print(Sys.getenv('RETICULATE_PYTHON'))"
Rscript -e "tryCatch({print(reticulate::py_config())}, error = function(e) {print(paste('Error:', e))})"
Rscript -e "rcmdcheck::rcmdcheck()"
codecov:
needs: R-CMD-check
runs-on: ubuntu-latest
container:
image: ghcr.io/drieslab/ci-giottosuite/ci-env
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history and tags
- name: catch R deps not in container
run: devtools::install_deps()
shell: Rscript {0}
- name: Set RETICULATE_PYTHON environment variable
run: |
echo "RETICULATE_PYTHON=/opt/miniconda/envs/r-reticulate/bin/python" >> $GITHUB_ENV
shell: bash
- name: Generate coverage report and upload
run: |
covr::codecov(
quiet = FALSE,
clean = FALSE,
branch = "staging",
type = c("tests", "examples", "vignettes"),
combine_types = TRUE,
install_path = file.path(Sys.getenv("RUNNER_TEMP"), "package")
)
shell: Rscript {0}
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
bioccheck:
needs: R-CMD-check
runs-on: ubuntu-latest
container:
image: ghcr.io/drieslab/ci-giottosuite/ci-env
credentials:
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v4
with:
fetch-depth: 0 # Fetch all history and tags
- name: catch R deps not in container
run: devtools::install_deps()
shell: Rscript {0}
- name: Build and install
run: |
R CMD build .
R CMD INSTALL *.tar.gz
- name: Run BiocCheck
run: |
BiocCheck::BiocCheck()
shell: Rscript {0}