11
11
GITHUB_TOKEN : ${{ secrets.GITHUB_TOKEN }}
12
12
GH_PAT : ${{ secrets.GH_PAT }}
13
13
GITHUB_PAT : ${{ secrets.GH_PAT }}
14
- WORKON_HOME : " ~/.virtualenvs"
15
14
16
15
steps :
17
16
- uses : actions/checkout@v4
@@ -33,20 +32,21 @@ jobs:
33
32
&& sudo apt install gh -y
34
33
shell : /bin/bash {0}
35
34
36
- - name : Setup Python and virtual environment using requirements file
37
- id : setup-python-venv
38
- uses :
srvanderplas/[email protected]
39
- with :
40
- python-version-file : ' .python-version'
41
- cache-dependency-path : requirements.txt
42
- install-cmd : " ./py-deps -i"
43
-
44
- - name : Test
45
- run : |
46
- echo $RETICULATE_PYTHON;
47
- echo $RETICULATE_PYTHON_ENV;
48
- echo "$pythonLocation" >> $GITHUB_PATH;
35
+ #
36
+ # - name: Setup Python and virtual environment using requirements file
37
+ # id: setup-python-venv
38
+ # uses: srvanderplas/[email protected]
39
+ # with:
40
+ # python-version-file: '.python-version'
41
+ # cache-dependency-path: requirements.txt
42
+ # install-cmd: "./py-deps -i"
49
43
44
+ # - name: Test
45
+ # run: |
46
+ # echo $RETICULATE_PYTHON;
47
+ # echo $RETICULATE_PYTHON_ENV;
48
+ # echo "$pythonLocation" >> $GITHUB_PATH;
49
+ #
50
50
51
51
- name : Renv setup
52
52
uses : r-lib/actions/setup-renv@v2
@@ -57,17 +57,21 @@ jobs:
57
57
renv::status()
58
58
renv::diagnostics()
59
59
60
- - name : Reticulate checks
60
+ - name : Setup Python/venv with reqs file in reticulate
61
+ id : setup-reticulate-venv
61
62
shell : Rscript {0}
62
63
run : |
63
- print(getwd())
64
-
65
- system("bash venv/bin/activate")
66
- system("which python")
64
+ reticulate::install_python(version=readLines(".python-version"))
65
+ reticulate::py_install(c("virtualenv"))
66
+ reticulate::virtualenv_root(".")
67
+ reticulate::virtualenv_create("venv", requirements="requirements.txt")
68
+ reticulate::use_virtualenv("venv")
67
69
70
+ - name : Reticulate checks
71
+ shell : Rscript {0}
72
+ run : |
68
73
devtools::session_info()
69
74
reticulate::py_config()
70
- reticulate::use_virtualenv("${{ env.VIRTUAL_ENV }}")
71
75
72
76
- uses : quarto-dev/quarto-actions/setup@v2
73
77
with :
0 commit comments