Commit 875dca3 Susan Vanderplas
committed
1 parent 56f02bb commit 875dca3 Copy full SHA for 875dca3
File tree 1 file changed +20
-1
lines changed
1 file changed +20
-1
lines changed Original file line number Diff line number Diff line change @@ -63,16 +63,35 @@ jobs:
63
63
run : |
64
64
reticulate::install_python(version=readLines(".python-version"))
65
65
reticulate::py_install(c("virtualenv"))
66
- reticulate::virtualenv_root("." )
66
+ reticulate::virtualenv_root()
67
67
reticulate::virtualenv_create("venv", requirements="requirements.txt")
68
68
reticulate::use_virtualenv("venv")
69
+ writeLines(
70
+ paste0("RETICULATE_PYTHON=", reticulate::virtualenv_python("venv")),
71
+ Sys.getenv("GITHUB_ENV"))
72
+ writeLines(
73
+ paste0("PY_CACHE_STR=python",
74
+ paste(
75
+ readLines(".python-version"),
76
+ reticulate::virtualenv_python("venv"),
77
+ digest::digest(readLines("requirements.txt"))
78
+ )),
79
+ Sys.getenv("GITHUB_ENV"))
80
+
81
+
69
82
70
83
- name : Reticulate checks
71
84
shell : Rscript {0}
72
85
run : |
73
86
devtools::session_info()
74
87
reticulate::py_config()
75
88
89
+ - uses : actions/cache@v4 # v4.0.0
90
+ id : cache-venv
91
+ with :
92
+ path : ${{ env.RETICULATE_PYTHON }}
93
+ key : setup-venv-${{ runner.os }}-${{ env.PY_CACHE_STR }}
94
+
76
95
- uses : quarto-dev/quarto-actions/setup@v2
77
96
with :
78
97
version : 1.5.57
You can’t perform that action at this time.
0 commit comments