R/Pharma
November 10th, 2022
Ben Straub (GSK) & Craig Gower-Page (Roche)
CI/CD bridges the gaps between development and operation activities and teams by enforcing automation in building, testing and deployment of applications. CI/CD services compile the incremental code changes made by developers, then link and package them into software deliverables
…Yes! Yes, it does!!
We just did all these in the R/Pharma Workshop: Intro to CI/CD for R Packages
admiral
family of packagesCheck Template
Workflow is executed.github/workflows/check-templates.yml
admiral
family has a package for developers, template R package repo and dummy dataadmiralci
, we have a common set of CI/CD workflowstern
for creating TLGsteal
for creating exploratory web applications for analyzing clinical trial datateal
framework for analyzing datashinytest2
R packagersconnect
and connectapi
R packagesdevtools::document()
tests/testthat/test-bigtest.R
test_that("Some long running section", {
skip_if_not(Sys.getenv("R_TEST_FULL") == "TRUE")
# <rest of the test code>
})
.
├── DESCRIPTION
├── R/
├── tests/
└── vignettes/
├── quickstart.Rmd
├── quickstart.html
└── quickstart.html.asis
DESCRIPTION
vignettes/quickstart.html.asis
.github/workflow/on_pr.yaml
vignettes:
runs-on: ubuntu-latest
container:
image: "ghcr.io/insightsengineering/rbmi:latest"
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build Vignettes
run: |
Rscript ./vignettes/build.R
.github/workflows/on_pr_main.yaml
jobs:
rcmdcheck:
strategy:
matrix:
config:
- { image: "ghcr.io/insightsengineering/rbmi:r404"}
- { image: "ghcr.io/insightsengineering/rbmi:r410"}
- { image: "ghcr.io/insightsengineering/rbmi:latest"}
runs-on: ubuntu-latest
container:
image: ${{ matrix.config.image }}
steps:
- name: Checkout
uses: actions/checkout@v3
- name: Build src
uses: ./.github/actions/build-src
- name: Check
uses: ./.github/actions/rcmdcheck
Further Reading
Advanced Examples
Presentation built with Quarto