Skip to content

Commit a58a411

Browse files
Merge pull request #810 from lorenzwalthert/update-gh-actions
- Update gh actions (#810).
2 parents 00125f0 + 714f51c commit a58a411

File tree

5 files changed

+40
-24
lines changed

5 files changed

+40
-24
lines changed

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

Lines changed: 35 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -1,9 +1,17 @@
1+
# NOTE: This workflow is overkill for most R packages
2+
# check-standard.yaml is likely a better choice
3+
# usethis::use_github_action("check-standard") will install it.
4+
#
5+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
6+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
17
on:
28
push:
39
branches:
10+
- main
411
- master
512
pull_request:
613
branches:
14+
- main
715
- master
816

917
name: R-CMD-check
@@ -18,29 +26,30 @@ jobs:
1826
fail-fast: false
1927
matrix:
2028
config:
21-
- {os: macOS-latest, r: 'devel'}
2229
- {os: macOS-latest, r: 'release'}
2330
- {os: windows-latest, r: 'release'}
24-
- {os: windows-latest, r: 'oldrel'}
25-
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
26-
- {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
27-
- {os: ubuntu-16.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
28-
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
29-
- {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
31+
- {os: windows-latest, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/latest"}
32+
- {os: ubuntu-18.04, r: 'devel', 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" }
33+
- {os: ubuntu-18.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
34+
- {os: ubuntu-18.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
35+
- {os: ubuntu-18.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
36+
- {os: ubuntu-18.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
37+
- {os: ubuntu-18.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
3038

3139
env:
3240
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
3341
RSPM: ${{ matrix.config.rspm }}
3442
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
35-
_R_CHECK_FORCE_SUGGESTS_: false
43+
3644
steps:
3745
- uses: actions/checkout@v2
3846

39-
- uses: r-lib/actions/setup-r@master
47+
- uses: r-lib/actions/setup-r@v1
4048
with:
4149
r-version: ${{ matrix.config.r }}
50+
http-user-agent: ${{ matrix.config.http-user-agent }}
4251

43-
- uses: r-lib/actions/setup-pandoc@master
52+
- uses: r-lib/actions/setup-pandoc@v1
4453

4554
- name: Query dependencies
4655
run: |
@@ -49,22 +58,20 @@ jobs:
4958
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
5059
shell: Rscript {0}
5160

52-
- name: Cache R packages
53-
if: runner.os != 'Windows'
54-
uses: actions/cache@v1
61+
- name: Restore R package cache
62+
uses: actions/cache@v2
5563
with:
5664
path: ${{ env.R_LIBS_USER }}
5765
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
5866
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
5967

6068
- name: Install system dependencies
6169
if: runner.os == 'Linux'
62-
env:
63-
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
6470
run: |
65-
Rscript -e "remotes::install_github('r-hub/sysreqs')"
66-
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
67-
sudo -s eval "$sysreqs"
71+
while read -r cmd
72+
do
73+
eval sudo $cmd
74+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "18.04"))')
6875
6976
- name: Install dependencies
7077
run: |
@@ -82,7 +89,10 @@ jobs:
8289
- name: Check
8390
env:
8491
_R_CHECK_CRAN_INCOMING_: false
85-
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
92+
_R_CHECK_FORCE_SUGGESTS_: false
93+
run: |
94+
options(crayon.enabled = TRUE)
95+
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
8696
shell: Rscript {0}
8797

8898
- name: Show testthat output
@@ -92,7 +102,12 @@ jobs:
92102

93103
- name: Upload check results
94104
if: failure()
95-
uses: actions/upload-artifact@master
105+
uses: actions/upload-artifact@main
96106
with:
97107
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
98108
path: check
109+
110+
- name: Don't use tar from old Rtools to store the cache
111+
if: ${{ runner.os == 'Windows' && startsWith(steps.install-r.outputs.installed-r-version, '3.6' ) }}
112+
shell: bash
113+
run: echo "C:/Program Files/Git/usr/bin" >> $GITHUB_PATH

.github/workflows/check-full.yaml

Whitespace-only changes.

.github/workflows/touchstone-receive.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -87,7 +87,7 @@ jobs:
8787
ref: ${{ matrix.config.benchmarking_ref }}
8888
path: ${{ matrix.config.benchmarking_path }}
8989
- name: Run benchmarks
90-
run: Rscript -e 'touchstone::with_touchstone_lib("touchstone/script.R")'
90+
run: Rscript -e 'touchstone::run_script("touchstone/script.R")'
9191
- name: Save PR number
9292
run: |
9393
echo ${{ github.event.number }} > ./touchstone/pr-comment/NR

.pre-commit-config.yaml

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -4,7 +4,7 @@ default_stages: [commit]
44

55
repos:
66
- repo: https://github.com/lorenzwalthert/precommit
7-
rev: v0.1.3.9010
7+
rev: v0.1.3.9014
88
hooks:
99
- id: style-files
1010
args: [--style_pkg=styler, --style_fun=tidyverse_style]

NEWS.md

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -69,8 +69,9 @@
6969
* style guide used in Addin is verified when set via R option (#789).
7070
* improve pkgdown author URLs (#775).
7171
* Upgrade touchstone infra (#799, #805).
72-
* Don't test on R 3.3. anymore as tidyverse
73-
[supports only four previous releases](https://www.tidyverse.org/blog/2019/04/r-version-support/) (#804).
72+
* Don't test on R 3.3 anymore as tidyverse [supports only four previous
73+
releases](https://www.tidyverse.org/blog/2019/04/r-version-support/) (#804).
74+
* Update Github Actions workflow (#810).
7475

7576
# styler 1.4.1
7677

0 commit comments

Comments
 (0)