Skip to content

Commit

Permalink
Update R-CMD-check.yaml
Browse files Browse the repository at this point in the history
Based on caracas' workflows
  • Loading branch information
mikewlcheung committed May 27, 2023
1 parent b91ffc6 commit 8658574
Showing 1 changed file with 26 additions and 2 deletions.
28 changes: 26 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
config:
# - {os: macos-latest, r: 'release'}
# - {os: windows-latest, r: 'release'}
# - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
- {os: ubuntu-latest, r: 'release'}
# - {os: ubuntu-latest, r: 'oldrel-1'}

Expand All @@ -39,11 +39,35 @@ jobs:
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

# mikl >
- uses: r-lib/actions/setup-r-dependencies@v2
with:
extra-packages: any::rcmdcheck, any::XML
extra-packages: any::rcmdcheck any::remotes any::reticulate
needs: check

# https://rstudio.github.io/reticulate/articles/package.html#using-github-actions
- uses: actions/setup-python@v4
with:
python-version: "3.x"

- name: setup r-reticulate venv
shell: Rscript {0}
run: |
# doBy Github:
remotes::install_github('hojsgaard/doby')
# reticulate
python_packages <- c("numpy", "sympy")
library(reticulate)
virtualenv_create("r-reticulate", Sys.which("python"))
virtualenv_install("r-reticulate", python_packages)
path_to_python <- virtualenv_python("r-reticulate")
writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python),
Sys.getenv("GITHUB_ENV"))
# < mikl

- uses: r-lib/actions/check-r-package@v2
with:
upload-snapshots: true

0 comments on commit 8658574

Please sign in to comment.