Skip to content

Commit e630f7c

Browse files
Merge pull request #288 from lorenzwalthert/update-gh-actions
- update gh actions (#288).
2 parents 064543f + d505b05 commit e630f7c

File tree

2 files changed

+15
-11
lines changed

2 files changed

+15
-11
lines changed

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

Lines changed: 14 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -8,9 +8,11 @@ on:
88
push:
99
branches:
1010
- master
11+
- main
1112
pull_request:
1213
branches:
1314
- master
15+
- main
1416

1517
name: R-CMD-check
1618

@@ -34,11 +36,6 @@ jobs:
3436
# Linux
3537
- {os: ubuntu-18.04, r: 'release', installation_method: 'pip', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
3638
- {os: ubuntu-18.04, r: 'release', installation_method: 'conda', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
37-
# - {os: ubuntu-16.04, r: 'devel', installation_method: 'conda', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest", http-user-agent: "R/4.0.0 (ubuntu-16.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
38-
# - {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
39-
# - {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
40-
# - {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
41-
# - {os: ubuntu-16.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
4239

4340
env:
4441
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
@@ -49,12 +46,12 @@ jobs:
4946
steps:
5047
- uses: actions/checkout@v2
5148

52-
- uses: r-lib/actions/setup-r@master
49+
- uses: r-lib/actions/setup-r@v1
5350
with:
5451
r-version: ${{ matrix.config.r }}
5552
http-user-agent: ${{ matrix.config.http-user-agent }}
5653

57-
- uses: r-lib/actions/setup-pandoc@master
54+
- uses: r-lib/actions/setup-pandoc@v1
5855

5956
- name: Query dependencies
6057
run: |
@@ -63,20 +60,20 @@ jobs:
6360
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
6461
shell: Rscript {0}
6562

66-
- name: Cache R packages
67-
if: runner.os != 'Windows'
68-
uses: actions/cache@v1
63+
- name: Restore R package cache
64+
uses: actions/cache@v2
6965
with:
7066
path: ${{ env.R_LIBS_USER }}
7167
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
7268
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
69+
7370
- name: Install system dependencies (Linux)
7471
if: runner.os == 'Linux'
7572
run: |
7673
while read -r cmd
7774
do
7875
eval sudo $cmd
79-
done < <(Rscript -e 'cat(remotes::system_requirements("ubuntu", "18.04"), sep = "\n")')
76+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "18.04"))')
8077
8178
- name: Install system dependencies (brew)
8279
if: matrix.config.installation_method == 'brew'
@@ -111,6 +108,7 @@ jobs:
111108
env:
112109
_R_CHECK_CRAN_INCOMING_: false
113110
run: |
111+
options(crayon.enabled = TRUE)
114112
if (Sys.getenv("PRECOMMIT_INSTALLATION_METHOD") != 'conda') {
115113
Sys.setenv("_R_CHECK_FORCE_SUGGESTS_" = "False")
116114
}
@@ -129,3 +127,8 @@ jobs:
129127
with:
130128
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
131129
path: check
130+
131+
- name: Don't use tar from old Rtools to store the cache
132+
if: ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3.6' ) }}
133+
shell: bash
134+
run: echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -59,6 +59,7 @@ depending on whether or not you previously used pre-commit.
5959
`--allow_private_imports` when the hook fails due to private imports (#254).
6060
- roxygenize hook is now fully tested (#267).
6161
- Hook scripts were relocated and R hooks now have a file extension (#280).
62+
- Updated GitHub Action workflows (#288).
6263

6364
# precommit v0.1.3
6465

0 commit comments

Comments
 (0)