Skip to content

triggering and referring to the devel branch instead of master for GHAs #375

triggering and referring to the devel branch instead of master for GHAs

triggering and referring to the devel branch instead of master for GHAs #375

on:
push:
# branches:
# - master
pull_request:
branches:
- devel
schedule:
- cron: '0 8 * * 5'
name: build_check_deploy
jobs:
build_check_deploy:
runs-on: ubuntu-latest
container: iseedevelopers/iseeu:latest
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Install dependencies
run: |
dependencies <- remotes::local_package_deps(dependencies = TRUE)
leftovers <- setdiff(dependencies, installed.packages())
BiocManager::install(leftovers, ask=FALSE, Ncpu=2L)
remotes::install_cran("rcmdcheck")
BiocManager::install("iSEE/iSEE")
shell: Rscript {0}
- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: rcmdcheck::rcmdcheck(args = c("--no-manual"), error_on = "error", check_dir = "check")
shell: Rscript {0}
- name: BiocCheck
run: |
BiocManager::install("BiocCheck")
BiocCheck::BiocCheck(".")
shell: Rscript {0}
- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash
- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: check-results
path: check
- name: Test coverage
run: |
install.packages("covr")
covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")
shell: Rscript {0}
- name: Build pkgdown
if: github.event_name == 'push' && github.ref == 'refs/heads/devel'
run: |
PATH=$PATH:$HOME/bin/ Rscript -e 'BiocManager::install("pkgdown"); pkgdown::build_site(".")'
# deploy needs rsync? Seems so.
- name: Install deploy dependencies
if: github.event_name == 'push' && github.ref == 'refs/heads/devel'
run: |
apt-get update && apt-get -y install rsync
- name: Deploy 🚀
if: github.event_name == 'push' && github.ref == 'refs/heads/devel'
uses: JamesIves/github-pages-deploy-action@releases/v3
with:
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
BRANCH: gh-pages # The branch the action should deploy to.
FOLDER: docs # The folder the action should deploy.
- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}