Skip to content

Merge pull request #110 from OxfordIHTM/rock-lee #133

Merge pull request #110 from OxfordIHTM/rock-lee

Merge pull request #110 from OxfordIHTM/rock-lee #133

name: check overall workflow
on:
push:
branches: [main, master]
pull_request:
branches: [main, master]
workflow_dispatch:
branches:
- '*'
jobs:
check-overall-workflow:
runs-on: ubuntu-latest
container: rocker/geospatial:4.3.2
steps:
- uses: actions/checkout@v4
- name: Install system dependencies
run: |
apt-get update && apt-get install -y --no-install-recommends \
libxt6 libglpk-dev
- name: Install R packages
run: |
install.packages(
c("rmarkdown", "openxlsx", "stringr", "remotes", "here",
"lme4", "forcats", "plotly", "patchwork", "kableExtra",
"gtsummary", "pubh", "janitor")
)
shell: Rscript {0}
- name: Check that workflow runs without errors
run: |
source("sudan_health_nutrition.R")
shell: Rscript {0}
- name: Check that Rmd file runs without errors
run: |
rmds <- list.files(path = "reports", pattern = "\\.Rmd$", full.names = TRUE) |>
(\(x) x[!stringr::str_detect(string = x, pattern = "case_study")])()
if (length(rmds) != 0) {
lapply(
X = rmds,
FUN = rmarkdown::render,
output_dir = "docs",
knit_root_dir = here::here()
)
}
shell: Rscript {0}
- name: Upload Rmarkdown reports
uses: actions/upload-artifact@v4
with:
name: rmd-output
path: docs/*.html