GA: Run 'R CMD check' also on R-devel for macOS - extend run-time [#73] #88
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
on: | |
push: | |
paths: | |
- 'r/**/*' | |
- .github/workflows/check-r.yml | |
pull_request: | |
paths: | |
- 'r/**/*' | |
- .github/workflows/check-r.yml | |
name: "R checks" | |
jobs: | |
check: | |
if: "! contains(github.event.head_commit.message, '[ci skip]')" | |
timeout-minutes: 20 | |
runs-on: ${{ matrix.config.os }} | |
name: ${{ matrix.config.os }} (R ${{ matrix.config.r }}) | |
strategy: | |
fail-fast: false | |
matrix: | |
config: | |
- {os: windows-latest, r: 'devel' } | |
- {os: windows-latest, r: 'release' } | |
- {os: windows-latest, r: 'oldrel' } | |
- {os: macOS-latest, r: 'devel' } | |
- {os: macOS-latest, r: 'release' } | |
# - {os: macOS-latest, r: 'oldrel' } | |
- {os: ubuntu-latest, r: 'devel' } | |
- {os: ubuntu-latest, r: 'release' } | |
- {os: ubuntu-latest, r: 'oldrel' } | |
- {os: ubuntu-latest, r: '3.6' } | |
env: | |
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} | |
R_KEEP_PKG_SOURCE: yes | |
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true | |
## R CMD check | |
_R_CHECK_CRAN_INCOMING_: false | |
_R_CHECK_LENGTH_1_CONDITION_: true | |
_R_CHECK_LENGTH_1_LOGIC2_: true | |
_R_CHECK_MATRIX_DATA_: true | |
_R_CHECK_SUGGESTS_ONLY_: true | |
steps: | |
- uses: actions/checkout@v4 | |
- uses: r-lib/actions/setup-pandoc@v2 | |
- uses: r-lib/actions/setup-tinytex@v2 | |
- name: Install system dependencies (Linux) | |
if: runner.os == 'Linux' | |
run: sudo apt-get install -y tidy | |
- uses: r-lib/actions/setup-r@v2 | |
with: | |
r-version: ${{ matrix.config.r }} | |
use-public-rspm: true | |
- uses: r-lib/actions/setup-r-dependencies@v2 | |
with: | |
working-directory: r | |
extra-packages: any::rcmdcheck any::jsonlite | |
- name: Install port4me | |
run: | | |
cd r/ | |
Rscript -e "install.packages('.', repos = NULL, type = 'source')" | |
- name: Session info | |
run: | | |
options(width = 100) | |
capabilities() | |
pkgs <- installed.packages()[, "Package"] | |
sessioninfo::session_info(pkgs, include_base = TRUE) | |
shell: Rscript {0} | |
- name: Check | |
if: runner.os != 'Windows' | |
run: | | |
rcmdcheck::rcmdcheck( | |
path = "r", | |
args = "--as-cran", | |
error_on = "note", | |
check_dir = "check" | |
) | |
shell: Rscript {0} | |
- name: Check (MS Windows) | |
if: runner.os == 'Windows' | |
run: | | |
rcmdcheck::rcmdcheck( | |
path = "r", | |
args = c("--no-manual", "--as-cran"), | |
error_on = "note", | |
check_dir = "check" | |
) | |
shell: Rscript {0} | |
- name: Check CLI | |
if: runner.os != 'Windows' | |
run: | | |
curl -L -O https://github.com/bats-core/bats-core/archive/refs/tags/v1.10.0.tar.gz && tar xf v1.10.0.tar.gz | |
curl -L -O https://github.com/bats-core/bats-support/archive/refs/tags/v0.3.0.tar.gz && tar xf v0.3.0.tar.gz | |
curl -L -O https://github.com/bats-core/bats-assert/archive/refs/tags/v2.1.0.tar.gz && tar xf v2.1.0.tar.gz | |
export BATS_SUPPORT_HOME=$PWD/bats-support-0.3.0 | |
export BATS_ASSERT_HOME=$PWD/bats-assert-2.1.0 | |
export PATH=$PWD/bats-core-1.10.0/bin:$PATH | |
bash --version | |
bats --version | |
cd r/ | |
make check-cli | |
- name: Upload check results | |
if: failure() | |
uses: actions/upload-artifact@v3 | |
with: | |
name: ${{ runner.os }}-r${{ matrix.config.r }}-results | |
path: check |