Skip to content

fix import, export, and documentation #17

fix import, export, and documentation

fix import, export, and documentation #17

on:
push:
pull_request:
branches:
- main
name: build_check_deploy
jobs:
build_check_deploy:
runs-on: ubuntu-latest
container: bioconductor/bioconductor_docker:devel
env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
NOT_CRAN: true
TZ: UTC
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- name: Checkout
uses: actions/checkout@v1
- name: Query dependencies
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
shell: Rscript {0}
# This lets us augment with additional dependencies
- 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'))")
echo "$sysreqs"
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE, repos = BiocManager::repositories(), Ncpu = 2L)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}
- name: Install BiocCheck
run: |
BiocManager::install("BiocCheck")
shell: Rscript {0}
- name: BiocCheck
run: |
BiocCheck::BiocCheck(".")
shell: Rscript {0}
- name: R CMD 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: 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/main'
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/main'
run: |
apt-get update && apt-get -y install rsync
- name: Deploy 🚀
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
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}
- name: Publish to Registry
if: github.event_name == 'push' && github.ref == 'refs/heads/main'
uses: elgohr/Publish-Docker-Github-Action@master
with:
name: docker.pkg.github.com/${{ github.repository }}/TVTB:latest
username: ${{ github.actor }}
password: ${{ secrets.GITHUB_TOKEN }}
registry: docker.pkg.github.com