@@ -105,14 +105,16 @@ jobs:
105
105
cat("r-version=", R.Version()$version.string, "\n", file = Sys.getenv("GITHUB_OUTPUT"), sep = "", append = TRUE)
106
106
shell : Rscript {0}
107
107
108
- - name : Cache R packages
109
- uses : actions/cache@v4
108
+ - name : Restore Renv package cache
109
+ id : cache-renv-packages-restore
110
+ uses : actions/cache/restore@v4
110
111
with :
111
- path : ${{ env.RENV_PATHS_ROOT }}
112
- key : ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-2-${{ hashFiles('tests/renv.lock') }}
112
+ path : |
113
+ ${{ env.RENV_PATHS_ROOT }}
114
+ renv/library
115
+ key : ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-3-${{ hashFiles('tests/renv.lock') }}
113
116
restore-keys : |
114
- ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-2-
115
- save-always : ${{ inputs.extra-r-packages == '' }} # don't save cache if we have extra R packages
117
+ ${{ steps.get-version.outputs.os-version }}-${{ steps.get-version.outputs.r-version }}-renv-3-
116
118
117
119
- name : Install missing system deps
118
120
if : runner.os == 'Linux'
@@ -291,15 +293,25 @@ jobs:
291
293
path : tests/timing-for-ci.txt
292
294
293
295
- name : Save Typst cache
294
- if : always()
296
+ if : always() && steps.cache-typst.outputs.cache-hit != 'true'
295
297
uses : actions/cache/save@v4
296
298
with :
297
299
key : ${{ steps.cache-typst.outputs.cache-primary-key }}
298
300
path : ${{ steps.cache-typst.outputs.cache-path }}
299
301
302
+ - name : Save Renv package cache
303
+ # don't save cache if we have extra R packages
304
+ if : ${{ always() && steps.cache-renv-packages-restore.outputs.cache-hit != 'true' && inputs.extra-r-packages == '' }}
305
+ uses : actions/cache/save@v4
306
+ with :
307
+ path : |
308
+ ${{ env.RENV_PATHS_ROOT }}
309
+ renv/library
310
+ key : ${{ steps.cache-renv-packages-restore.outputs.cache-primary-key }}
311
+
300
312
- uses : actions/upload-artifact@v4
301
- # PLaywright test only runs on Linux for now
302
- if : ${{ !cancelled() && runner.os != 'Windows' }}
313
+ # Upload pLaywright test report if they exists (playwright is only running on Linux for now)
314
+ if : ${{ !cancelled() && runner.os != 'Windows' && hashFiles('tests/integration/playwright/playwright-report/**/*') != '' }}
303
315
with :
304
316
name : playwright-report
305
317
path : ./tests/integration/playwright/playwright-report/
0 commit comments