Skip to content

Commit

Permalink
Merge pull request #316 from mixOmicsTeam/github-actions-fix
Browse files Browse the repository at this point in the history
GitHub actions fix: r-cmd-check
  • Loading branch information
evaham1 authored Oct 2, 2024
2 parents 2ccaa95 + 55da038 commit 01c2576
Show file tree
Hide file tree
Showing 41 changed files with 3,408 additions and 562 deletions.
64 changes: 46 additions & 18 deletions .github/workflows/actions.yml
Original file line number Diff line number Diff line change
Expand Up @@ -76,8 +76,8 @@ jobs:
fail-fast: false
matrix:
config:
# - { os: windows-latest, r: '${{ needs.versions.outputs.r }}', bioc: '${{ needs.versions.outputs.bioc }}'}
# - { os: macOS-latest, r: '${{ needs.versions.outputs.r }}', bioc: '${{ needs.versions.outputs.bioc }}'}
- { os: windows-latest, r: '${{ needs.versions.outputs.r }}', bioc: '${{ needs.versions.outputs.bioc }}'}
- { os: macOS-latest, r: '${{ needs.versions.outputs.r }}', bioc: '${{ needs.versions.outputs.bioc }}'}
- { os: ubuntu-latest, r: '${{ needs.versions.outputs.r }}', bioc: '${{ needs.versions.outputs.bioc }}', image: 'bioconductor/bioconductor_docker:${{ needs.versions.outputs.bioc }}'}

env:
Expand Down Expand Up @@ -124,17 +124,38 @@ jobs:
key: ${{ runner.os }}-r-${{ matrix.config.r }}-bioc-${{ matrix.config.bioc }}-${{ hashFiles('depends.Rds') }}
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-bioc-${{ matrix.config.bioc }}-

- name: Install system dependencies 🔧
## the below step doesn't work anymore because 'sysreqs' API is archived
# - name: Install system dependencies 🔧
# if: runner.os == 'Linux'
# env:
# RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
# run: |
# Rscript -e "remotes::install_github('r-hub/sysreqs')"
# sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
# sudo -s eval "$sysreqs"
# sudo apt-get update && sudo apt-get -y install libcurl4-openssl-dev

- name: Install system and package dependencies using github action 🔧
uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-repositories: 'https://cloud.r-project.org'

- name: Install extra dependencies for macOS
if: runner.os == 'macOS'
run: |
brew install --cask xquartz
brew install gcc
- name: Install extra dependencies for linux
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
sudo apt-get update && sudo apt-get -y install libcurl4-openssl-dev
sudo apt-get update
sudo apt-get install -y pandoc-citeproc
sudo apt-get install -y qpdf
- name: Install dependencies 🔨
- name: Install R dependencies 🔨
run: |
options(repos = c(CRAN = "https://cran.r-project.org"))
remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories(), Ncpus=2)
Expand All @@ -149,17 +170,24 @@ jobs:
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

# runs rmdcheck, first runs 'devtools::install to make sure there is a copy of mixOmics the parallel workers can access'
- name: Check ✅
if: (!contains(github.event.head_commit.message, 'skip-check'))
run: rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "warning", check_dir = "check")
run: |
remotes::install_cran("devtools", Ncpus=2)
devtools::install()
devtools::check(args = c("--no-manual"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Check --as-cran ✅ ✅
if: github.event_name == 'schedule' && github.repository == 'mixOmicsTeam/mixOmics'
env:
_R_CHECK_CRAN_INCOMING_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran", "--ignore-vignettes", "--run-dontrun"), error_on = "never", check_dir = "check/asCRAN", build_args = c("--no-build-vignettes"))
run: |
options(devtools.check.dir = "check/asCRAN", devtools.check.warning = "never")
devtools::check(args = c("--no-manual", "--as-cran", "--ignore-vignettes", "--run-dontrun"), build_args = c("--no-build-vignettes"))
shell: Rscript {0}

# - name: BiocCheck 🧬 ✅
# if: github.event_name == 'schedule' && github.repository == 'mixOmicsTeam/mixOmics'
# run: |
Expand Down Expand Up @@ -190,17 +218,17 @@ jobs:
build_args: BIOC_VERSION=${{ needs.versions.outputs.bioc }}

- name: Test coverage 🔍
# if: (matrix.config.os == 'ubuntu-latest' && matrix.config.r == 'release')
if: github.event_name == 'schedule' && github.repository == 'mixOmicsTeam/mixOmics'
# the commands between 'set +e' and 'set -e' are run without throwing any error
run: |
set +e
Rscript -e "covr::codecov(type = c('tests', 'examples'))"
set -e
- name: Notify Slack 📣
uses: 8398a7/action-slack@v3
with:
status: ${{ job.status }}
fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
env:
SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # set in rep's setting >> secrets
# - name: Notify Slack 📣
# uses: 8398a7/action-slack@v3
# with:
# status: ${{ job.status }}
# fields: repo,message,commit,author,action,eventName,ref,workflow,job,took # selectable (default: repo,message)
# env:
# SLACK_WEBHOOK_URL: ${{ secrets.SLACK_WEBHOOK_URL }} # set in rep's setting >> secrets
53 changes: 29 additions & 24 deletions DESCRIPTION
Original file line number Diff line number Diff line change
Expand Up @@ -6,29 +6,34 @@ Depends: R (>= 3.5.0),
MASS,
lattice,
ggplot2
Imports: igraph,
ellipse,
corpcor,
RColorBrewer,
parallel,
dplyr,
tidyr,
reshape2,
methods,
matrixStats,
rARPACK,
gridExtra,
grDevices,
graphics,
stats,
ggrepel,
BiocParallel,
utils
Suggests: BiocStyle,
knitr,
rmarkdown,
testthat,
rgl
Imports:
igraph,
ellipse,
corpcor,
RColorBrewer,
parallel,
dplyr,
tidyr,
reshape2,
methods,
matrixStats,
rARPACK,
gridExtra,
grDevices,
graphics,
stats,
ggrepel,
BiocParallel,
utils,
gsignal
Suggests:
BiocStyle,
knitr,
rmarkdown,
testthat,
rgl,
microbenchmark,
magick
Authors@R:
c(person("Kim-Anh", "Le Cao", role = "aut", email = "[email protected]"),
person("Florian", "Rohart", role = "aut"),
Expand Down Expand Up @@ -64,5 +69,5 @@ biocViews: ImmunoOncology,
MultipleComparison,
Classification,
Regression
RoxygenNote: 7.2.3
RoxygenNote: 7.3.2
Encoding: UTF-8
11 changes: 11 additions & 0 deletions NAMESPACE
Original file line number Diff line number Diff line change
Expand Up @@ -108,6 +108,7 @@ S3method(summary,mixo_pls)
S3method(summary,mixo_spls)
S3method(summary,pca)
S3method(summary,rcc)
export("%fp%")
export(auroc)
export(background.predict)
export(block.pls)
Expand All @@ -121,15 +122,21 @@ export(color.GreenRed)
export(color.jet)
export(color.mixo)
export(color.spectral)
export(dctii_m_transforms)
export(explained_variance)
export(facewise_product)
export(facewise_transpose)
export(ft)
export(get.BER)
export(get.confusion_matrix)
export(imgCor)
export(impute.nipals)
export(ipca)
export(logratio.transfo)
export(m_product)
export(map)
export(mat.rank)
export(matrix_to_m_transforms)
export(mint.block.pls)
export(mint.block.plsda)
export(mint.block.spls)
Expand Down Expand Up @@ -160,6 +167,10 @@ export(spca)
export(spls)
export(splsda)
export(study_split)
export(tpca)
export(tpls)
export(tplsda)
export(tsvdm)
export(tune)
export(tune.block.splsda)
export(tune.mint.splsda)
Expand Down
Loading

0 comments on commit 01c2576

Please sign in to comment.