future #117
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: future | |
on: | |
schedule: | |
- cron: "0 09 * * 1" | |
workflow_dispatch: | |
jobs: | |
future: | |
runs-on: ubuntu-22.04 | |
name: future | |
env: | |
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest" | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
steps: | |
- uses: actions/checkout@v3 | |
with: | |
repository: "workflowr/workflowr" | |
- name: Install system dependencies | |
run: | | |
sudo apt-get install -y software-properties-common | |
sudo apt-get update | |
sudo apt-get install -y \ | |
libcurl4-openssl-dev \ | |
libgit2-dev \ | |
libpng-dev \ | |
libsm6 \ | |
libssl-dev \ | |
libxml2-dev \ | |
libxt6 \ | |
netbase \ | |
python3 \ | |
python3-matplotlib \ | |
qpdf \ | |
zlib1g-dev | |
- uses: r-lib/actions/setup-pandoc@v2 | |
with: | |
pandoc-version: "2.19.2" | |
- uses: r-lib/actions/setup-r@v2 | |
id: install-r | |
with: | |
r-version: "devel" | |
- name: Restore R package cache | |
uses: actions/cache@v3 | |
with: | |
path: ${{ env.R_LIBS_USER }}/* | |
key: ubuntu-22.04-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('DESCRIPTION') }} | |
restore-keys: ubuntu-22.04-${{ steps.install-r.outputs.installed-r-version }}-1- | |
- name: Install dependencies | |
run: | | |
print(getOption("repos")) | |
if (!requireNamespace("remotes", quietly = TRUE)) { | |
install.packages("remotes") | |
} | |
library("remotes") | |
install_github("r-lib/callr") | |
install_github("mdlincoln/clipr") | |
install_github("r-lib/fs") | |
install_github("wrathematics/getPass") | |
install_github("ropensci/git2r") | |
install_github("tidyverse/glue") | |
install_github("r-lib/httr") | |
install_github("yihui/knitr") | |
install_github("rstudio/miniUI") | |
install_github("rstudio/reticulate") | |
install_github("rstudio/rmarkdown") | |
install_github("krlmlr/rprojroot") | |
install_github("rstudio/rstudioapi") | |
install_github("r-lib/sessioninfo") | |
install_github("rstudio/shiny") | |
install_github("tidyverse/stringr") | |
install_github("r-lib/testthat") | |
install_github("edwindj/whisker") | |
install_github("r-lib/withr") | |
install_github("viking/r-yaml") | |
shell: Rscript {0} | |
- name: Session info | |
run: | | |
options(width = 100) | |
pkgs <- installed.packages()[, "Package"] | |
sessioninfo::session_info(pkgs, include_base = TRUE) | |
shell: Rscript {0} | |
- name: Check | |
env: | |
_R_CHECK_CRAN_INCOMING_: false | |
run: | | |
R CMD build . | |
R CMD check --as-cran --no-examples --no-manual *tar.gz | |
- name: Show testthat output | |
if: always() | |
run: find workflowr.Rcheck -name 'testthat.Rout*' -exec cat '{}' \; || true | |
shell: bash | |
- name: Upload check results | |
if: failure() | |
uses: actions/upload-artifact@main | |
with: | |
name: future-results | |
path: workflowr.Rcheck |