Skip to content

Drop dependency on lazyeval #415

Drop dependency on lazyeval

Drop dependency on lazyeval #415

Workflow file for this run

# 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
name: R-CMD-check
jobs:
R-CMD-check:
runs-on: ${{ matrix.config.os }}
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
strategy:
fail-fast: false
matrix:
config:
# vdiffr & shinytest only runs on mac r-release since the results aren't cross-platform
- {os: macOS-latest, r: 'release', visual_tests: true, node: "14.x", shinytest: true}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: '4.1'}
- {os: windows-latest, r: '3.6'}
- {os: ubuntu-latest, r: 'devel'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'oldrel-2'}
- {os: ubuntu-latest, r: 'oldrel-3'}
- {os: ubuntu-latest, r: 'oldrel-4'}
env:
VISUAL_TESTS: ${{ matrix.config.visual_tests }}
SHINYTEST: ${{ matrix.config.shinytest }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
MAPBOX_TOKEN: ${{ secrets.MAPBOX_TOKEN }}
plotly_username: ${{ secrets.PLOTLY_USERNAME }}
plotly_api_key: ${{ secrets.PLOTLY_API_KEY }}
steps:
- uses: actions/checkout@v2
- uses: r-lib/actions/setup-r@v2
id: install-r
with:
r-version: ${{ matrix.config.r }}
use-public-rspm: true
- uses: r-lib/actions/setup-pandoc@v2
- uses: r-lib/actions/setup-r-dependencies@v2
with:
cache-version: 3
needs: check
- name: Set up Python 3.8
uses: actions/setup-python@v2
with:
python-version: 3.8
- name: Install kaleido
if: matrix.config.visual_tests == true
run: |
sudo chown -R $UID $CONDA # https://github.com/nextstrain/conda/issues/5
Rscript -e "reticulate::install_miniconda()"
Rscript -e "reticulate::conda_install('r-reticulate', 'python-kaleido')"
Rscript -e "reticulate::conda_install('r-reticulate', 'plotly', channel = 'plotly')"
Rscript -e "reticulate::use_miniconda('r-reticulate')"
- name: Install shinytest deps
if: matrix.config.shinytest == true
run: |
Rscript -e 'shinytest::installDependencies()'
R CMD install .
shell: bash
# Run test() before R CMD check since, for some reason, rcmdcheck::rcmdcheck() skips vdiffr tests
- name: Run Tests
run: |
options(crayon.enabled = TRUE, testthat.progress.max_fails=1000)
res <- devtools::test()
df <- as.data.frame(res)
if (sum(df$failed) > 0 || any(df$error)) stop("GHA CI tests failed")
shell: Rscript {0}
# Upload the whole pkg since tests where run with devtools::test()
- name: Upload check results
if: always()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: ./
- name: Check package
uses: r-lib/actions/check-r-package@v2
with:
check-dir: '"check"'
# Run check with --no-tests since we ran them abve
# 2023-01-03: `{purrr}` v1.0.0 had trouble on Windows without the `--no-multiarch`
# https://github.com/plotly/plotly.R/pull/2221
args: 'c("--no-tests", "--no-manual", "--as-cran", "--no-multiarch")'
error-on: '"warning"'
#- name: Show testthat output
# if: always()
# run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
# shell: bash