diff --git a/.github/workflows/R_CMD_check_main_weekly.yaml b/.github/workflows/R_CMD_check_main_weekly.yaml index 73bfe18..e9fdf9e 100644 --- a/.github/workflows/R_CMD_check_main_weekly.yaml +++ b/.github/workflows/R_CMD_check_main_weekly.yaml @@ -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 @@ -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")'