Skip to content

Commit 7c64c6d

Browse files
committed
Update GH actions
1 parent d51e5cf commit 7c64c6d

File tree

3 files changed

+23
-14
lines changed

3 files changed

+23
-14
lines changed

.github/workflows/R-CMD-check.yaml

Lines changed: 17 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
on: [push, pull_request]
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
28

39
name: R-CMD-check
410

@@ -13,13 +19,13 @@ jobs:
1319
matrix:
1420
config:
1521
- {os: macOS-latest, r: 'devel'}
16-
- {os: macOS-latest, r: '4.0'}
17-
- {os: windows-latest, r: '4.0'}
18-
- {os: ubuntu-16.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
19-
- {os: ubuntu-16.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
20-
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
21-
- {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
22-
- {os: ubuntu-16.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
22+
- {os: macOS-latest, r: 'release'}
23+
- {os: windows-latest, r: 'release'}
24+
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
25+
- {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
26+
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
27+
- {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
28+
- {os: ubuntu-16.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
2329

2430
env:
2531
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
@@ -39,15 +45,16 @@ jobs:
3945
run: |
4046
install.packages('remotes')
4147
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
48+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
4249
shell: Rscript {0}
4350

4451
- name: Cache R packages
4552
if: runner.os != 'Windows'
4653
uses: actions/cache@v1
4754
with:
4855
path: ${{ env.R_LIBS_USER }}
49-
key: ${{ runner.os }}-r-${{ matrix.config.r }}-1-${{ hashFiles('.github/depends.Rds') }}
50-
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-1-
56+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
57+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
5158

5259
- name: Install system dependencies
5360
if: runner.os == 'Linux'

.github/workflows/pkgdown.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,14 +20,15 @@ jobs:
2020
run: |
2121
install.packages('remotes')
2222
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
23+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
2324
shell: Rscript {0}
2425

2526
- name: Cache R packages
2627
uses: actions/cache@v1
2728
with:
2829
path: ${{ env.R_LIBS_USER }}
29-
key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }}
30-
restore-keys: macOS-r-4.0-1-
30+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
31+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
3132

3233
- name: Install dependencies
3334
run: |

.github/workflows/test-coverage.yaml

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -24,14 +24,15 @@ jobs:
2424
run: |
2525
install.packages('remotes')
2626
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
27+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
2728
shell: Rscript {0}
2829

2930
- name: Cache R packages
3031
uses: actions/cache@v1
3132
with:
3233
path: ${{ env.R_LIBS_USER }}
33-
key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }}
34-
restore-keys: macOS-r-4.0-1-
34+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
35+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
3536

3637
- name: Install dependencies
3738
run: |

0 commit comments

Comments
 (0)