Merge pull request #156 from jhudsl/ki/refactor_screenshotDupNames #436
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
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. | |
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
name: R-CMD-check | |
jobs: | |
R-CMD-check: | |
runs-on: ubuntu-latest | |
container: | |
image: jhudsl/base_ottr | |
steps: | |
- uses: actions/checkout@v4 | |
- name: Install dependencies | |
run: | | |
remotes::install_deps(dependencies = TRUE) | |
remotes::install_cran("devtools") | |
sessionInfo() | |
shell: Rscript {0} | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
- name: Check | |
run: | | |
options(crayon.enabled = TRUE) | |
devtools::document() | |
devtools::load_all() | |
rcmdcheck::rcmdcheck(args = c("--no-manual"), check_dir = "check") | |
shell: Rscript {0} | |
env: | |
GH_PAT: ${{ secrets.GH_PAT }} | |
- name: Check testthat | |
id: check_check | |
run: | | |
error_num=$(Rscript --vanilla '.github/workflows/check_testthat.R') | |
echo "error_num=$error_num" >> $GITHUB_OUTPUT | |
- name: Stop if there are errors! | |
if: ${{ steps.check_check.outputs.error_num != '0' }} | |
run: exit 1 | |
- name: Upload check results | |
if: failure() | |
uses: actions/upload-artifact@main | |
with: | |
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | |
path: check |