Skip to content

Commit

Permalink
Update R_CMD_check_main_weekly.yaml
Browse files Browse the repository at this point in the history
add python dependancies to weekly hades action
  • Loading branch information
egillax authored Sep 9, 2023
1 parent 80f94e1 commit 2aba758
Showing 1 changed file with 19 additions and 0 deletions.
19 changes: 19 additions & 0 deletions .github/workflows/R_CMD_check_main_weekly.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -55,6 +55,10 @@ jobs:
- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}

- uses: actions/setup-python@v4
with:
python-version: '3.10'

- uses: r-lib/actions/setup-tinytex@v2

Expand All @@ -65,6 +69,21 @@ jobs:
extra-packages: any::rcmdcheck
needs: check

- name: setup r-reticulate venv
shell: Rscript {0}
run: |
python_packages <-
c("polars", "tqdm", "connectorx", "pyarrow", "scikit-learn")
library(reticulate)
virtualenv_create("r-reticulate", Sys.which("python"))
virtualenv_install("r-reticulate", python_packages)
virtualenv_install("r-reticulate", "torch", pip_options = c("--index-url https://download.pytorch.org/whl/cpu"))
path_to_python <- virtualenv_python("r-reticulate")
writeLines(sprintf("RETICULATE_PYTHON=%s", path_to_python),
Sys.getenv("GITHUB_ENV"))
- uses: r-lib/actions/check-r-package@v2
with:
args: 'c("--no-manual", "--as-cran")'
Expand Down

0 comments on commit 2aba758

Please sign in to comment.