Skip to content

Commit 9274aed

Browse files
set styler cache
1 parent 1cc9b92 commit 9274aed

File tree

1 file changed

+16
-0
lines changed

1 file changed

+16
-0
lines changed

.github/workflows/pr-commands.yaml

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -42,6 +42,22 @@ jobs:
4242
- uses: r-lib/actions/setup-r@master
4343
- name: Install dependencies
4444
run: Rscript -e 'install.packages("styler")'
45+
- name: save R.cache location
46+
id: save-r-cache-location
47+
run: |
48+
cat("##[set-output name=r-cache-location;]", R.cache::getCacheRootPath(), "\n", sep = "")
49+
shell: Rscript {0}
50+
- name: R.cache cache
51+
uses: actions/cache@v2
52+
env:
53+
cache-name: r-cache
54+
with:
55+
path: ${{ r-cache-location }}
56+
key: ${{ runner.os }}-${{ env.cache-name }}-${{ github.sha }}
57+
restore-keys: |
58+
${{ runner.os }}-${{ env.cache-name }}-
59+
${{ runner.os }}-
60+
4561
- name: Style
4662
run: Rscript -e 'styler::style_pkg()'
4763
- name: commit

0 commit comments

Comments
 (0)