diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 027b74be3..e7eb7908e 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -1,36 +1,74 @@ -name: R-CMD-check +# NOTE: This workflow is overkill for most R packages +# check-standard.yaml is likely a better choice +# usethis::use_github_action("check-standard") will install it. +# +# 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 - master pull_request: branches: + - main - master + - rc-v** +name: R-CMD-check jobs: + rversions: + name: R Versions + runs-on: ubuntu-latest + outputs: + devel: ${{ steps.devel.outputs.installed-r-version }} + release: ${{ steps.release.outputs.installed-r-version }} + oldrel1: ${{ steps.oldrel1.outputs.installed-r-version }} + oldrel2: ${{ steps.oldrel2.outputs.installed-r-version }} + oldrel3: ${{ steps.oldrel3.outputs.installed-r-version }} + oldrel4: ${{ steps.oldrel4.outputs.installed-r-version }} + steps: + - { name: devel, uses: r-lib/actions/setup-r@master, id: devel, with: { r-version: devel, install-r: false }} + - { name: release, uses: r-lib/actions/setup-r@master, id: release, with: { r-version: release, install-r: false }} + - { name: oldrel/1, uses: r-lib/actions/setup-r@master, id: oldrel1, with: { r-version: oldrel/1, install-r: false }} + - { name: oldrel/2, uses: r-lib/actions/setup-r@master, id: oldrel2, with: { r-version: oldrel/2, install-r: false }} + - { name: oldrel/3, uses: r-lib/actions/setup-r@master, id: oldrel3, with: { r-version: oldrel/3, install-r: false }} + - { name: oldrel/4, uses: r-lib/actions/setup-r@master, id: oldrel4, with: { r-version: oldrel/4, install-r: false }} + + R-CMD-check: runs-on: ${{ matrix.config.os }} name: ${{ matrix.config.os }} (${{ matrix.config.r }}) + needs: + - rversions strategy: fail-fast: false matrix: config: - - {os: macOS-latest, r: 'devel'} - - {os: macOS-latest, r: '4.0'} - - {os: windows-latest, r: '4.0'} - - {os: ubuntu-16.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} - - {os: ubuntu-16.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"} + - {os: macOS-latest, r: '${{ needs.rversions.outputs.devel }}'} + - {os: macOS-latest, r: '${{ needs.rversions.outputs.release }}'} + - {os: windows-latest, r: '${{ needs.rversions.outputs.release }}'} + - {os: windows-latest, r: '3.6'} + + - {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.devel }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest", http-user-agent: "release" } + - {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.release }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.oldrel1 }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.oldrel2 }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.oldrel3 }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + - {os: ubuntu-20.04, r: '${{ needs.rversions.outputs.oldrel4 }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"} + + - {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.devel }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "release" } + - {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.release }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} + - {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.oldrel1 }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} + - {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.oldrel2 }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} + - {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.oldrel3 }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} + - {os: ubuntu-18.04, r: '${{ needs.rversions.outputs.oldrel4 }}', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"} env: - _R_CHECK_FORCE_SUGGESTS_: false - R_REMOTES_NO_ERRORS_FROM_WARNINGS: true RSPM: ${{ matrix.config.rspm }} GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} @@ -44,32 +82,36 @@ jobs: - uses: actions/checkout@v2 - - uses: r-lib/actions/setup-r@master + - uses: r-lib/actions/setup-r@v1 id: install-r with: r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} - - uses: r-lib/actions/setup-pandoc@master + - uses: r-lib/actions/setup-pandoc@v1 - name: Install pak and query dependencies - shell: Rscript {0} run: | install.packages("pak", repos = "https://r-lib.github.io/p/pak/dev/") - saveRDS(pak::pkg_deps_tree("local::.", dependencies = TRUE), ".github/r-depends.rds") + saveRDS(pak::pkg_deps("local::.", dependencies = TRUE), ".github/r-depends.rds") + shell: Rscript {0} - - name: Cache R packages + - name: Restore R package cache uses: actions/cache@v2 with: - path: ${{ env.R_LIBS_USER }} + path: | + ${{ env.R_LIBS_USER }}/* + !${{ env.R_LIBS_USER }}/pak key: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1-${{ hashFiles('.github/r-depends.rds') }} restore-keys: ${{ matrix.config.os }}-${{ steps.install-r.outputs.installed-r-version }}-1- - name: Install system dependencies if: runner.os == 'Linux' - shell: Rscript {0} run: | pak::local_system_requirements(execute = TRUE) - + pak::pkg_system_requirements("rcmdcheck", execute = TRUE) + shell: Rscript {0} + # https://stackoverflow.com/a/66568545/591574 #> fatal error: 'X11/Intrinsic.h' file not found - name: Install Cairo macOS R devel dependency @@ -86,14 +128,6 @@ jobs: brew install cairo brew install harfbuzz fribidi - # Use a shorter temp directory for pak installations, due to filename - # length issues on Windows. https://github.com/r-lib/pak/issues/252 - - name: Windows temp dir - if: runner.os == 'Windows' - run: | - New-Item -Path "C:\" -Name "tmp" -ItemType Directory - echo "TMPDIR=c:\tmp" | Out-File -FilePath $env:GITHUB_ENV -Encoding utf8 -Append - - name: Install dependencies run: | pak::local_install_dev_deps(upgrade = TRUE) @@ -126,7 +160,9 @@ jobs: env: _R_CHECK_CRAN_INCOMING_: false _R_CHECK_FORCE_SUGGESTS_: ${{ matrix.config.r != 'devel' }} - run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") + run: | + options(crayon.enabled = TRUE) + rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check") shell: Rscript {0} - name: Show testthat output @@ -136,15 +172,12 @@ jobs: - name: Upload check results if: failure() - uses: actions/upload-artifact@v2 + uses: actions/upload-artifact@main with: name: ${{ matrix.config.os }}-r${{ matrix.config.r }}-results path: check - - name: Fix path for Windows caching - if: runner.os == 'Windows' - # This is needed because if you use the default tar at this stage, - # C:/Rtools/bin/tar.exe, it will say that it can't find gzip.exe. So - # we'll just set the path so that the original tar that would be - # found, will be found. + - name: Don't use tar from old Rtools to store the cache + if: ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3.6' ) }} + shell: bash run: echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH diff --git a/.github/workflows/rituals.yaml b/.github/workflows/rituals.yaml index 6c9e17b26..78d07696c 100644 --- a/.github/workflows/rituals.yaml +++ b/.github/workflows/rituals.yaml @@ -12,15 +12,14 @@ name: Rituals jobs: rituals: name: Rituals - # if: false - runs-on: ${{ matrix.config.os }} + runs-on: ${{ matrix.config.os }} strategy: fail-fast: false matrix: config: - - { os: ubuntu-16.04, r: '4.0', node: "14.x", rspm: "https://packagemanager.rstudio.com/all/__linux__/xenial/latest"} + - { os: ubuntu-20.04, r: 'release', node: "14.x", rspm: "https://packagemanager.rstudio.com/all/__linux__/focal/latest"} env: R_REMOTES_NO_ERRORS_FROM_WARNINGS: true diff --git a/man/varSelectInput.Rd b/man/varSelectInput.Rd index 4323a7320..d65b69879 100644 --- a/man/varSelectInput.Rd +++ b/man/varSelectInput.Rd @@ -76,10 +76,10 @@ value when it is a single choice input and the empty string is not in the The resulting server \code{input} value will be returned as: \itemize{ \item A symbol if \code{multiple = FALSE}. The \code{input} value should be -used with rlang's \code{\link[rlang:bang-bang]{rlang::!!()}}. For example, +used with rlang's \code{\link[rlang:nse-force]{rlang::!!()}}. For example, \code{ggplot2::aes(!!input$variable)}. \item A list of symbols if \code{multiple = TRUE}. The \code{input} value -should be used with rlang's \code{\link[rlang:bang-bang]{rlang::!!!()}} to expand +should be used with rlang's \code{\link[rlang:nse-force]{rlang::!!!()}} to expand the symbol list as individual arguments. For example, \code{dplyr::select(mtcars, !!!input$variabls)} which is equivalent to \code{dplyr::select(mtcars, !!input$variabls[[1]], !!input$variabls[[2]], ..., !!input$variabls[[length(input$variabls)]])}.