Skip to content

Commit b3d85c1

Browse files
Update gitHub actions (#5188)
* use_tidy_github_actions() * Bump cache version * Fix cache version in workflows * Bump minimum required version of R * Revert "Bump minimum required version of R" This reverts commit 642241f. * vctrs depends on 3.3 anyway * NEWS bullet about dropping support for 3.2
1 parent aef7f09 commit b3d85c1

8 files changed

+145
-26
lines changed

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

+26-18
Original file line numberDiff line numberDiff line change
@@ -18,18 +18,17 @@ jobs:
1818
fail-fast: false
1919
matrix:
2020
config:
21-
- {os: windows-latest, r: '3.6'}
22-
- {os: macOS-latest, r: '3.6'}
23-
- {os: macOS-latest, r: 'devel'}
24-
- {os: ubuntu-16.04, r: '3.2', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
25-
- {os: ubuntu-16.04, r: '3.3', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
26-
- {os: ubuntu-16.04, r: '3.4', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
27-
- {os: ubuntu-16.04, r: '3.5', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
28-
- {os: ubuntu-16.04, r: '3.6', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
21+
- {os: macOS-latest, r: 'devel'}
22+
- {os: macOS-latest, r: '4.0'}
23+
- {os: windows-latest, r: '4.0'}
24+
- {os: ubuntu-16.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
25+
- {os: ubuntu-16.04, r: '3.6', 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"}
2929

3030
env:
3131
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
32-
_R_CHECK_FORCE_SUGGESTS_: false
3332
RSPM: ${{ matrix.config.rspm }}
3433

3534
steps:
@@ -44,16 +43,16 @@ jobs:
4443
- name: Query dependencies
4544
run: |
4645
install.packages('remotes')
47-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
46+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
4847
shell: Rscript {0}
4948

5049
- name: Cache R packages
5150
if: runner.os != 'Windows'
5251
uses: actions/cache@v1
5352
with:
5453
path: ${{ env.R_LIBS_USER }}
55-
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
56-
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-
54+
key: ${{ runner.os }}-r-${{ matrix.config.r }}-2-${{ hashFiles('.github/depends.Rds') }}
55+
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-1-
5756

5857
- name: Install system dependencies
5958
if: runner.os == 'Linux'
@@ -70,18 +69,27 @@ jobs:
7069
remotes::install_cran("rcmdcheck")
7170
shell: Rscript {0}
7271

72+
- name: Session info
73+
run: |
74+
options(width = 100)
75+
pkgs <- installed.packages()[, "Package"]
76+
sessioninfo::session_info(pkgs, include_base = TRUE)
77+
shell: Rscript {0}
78+
7379
- name: Check
74-
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
80+
env:
81+
_R_CHECK_CRAN_INCOMING_: false
82+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
7583
shell: Rscript {0}
7684

85+
- name: Show testthat output
86+
if: always()
87+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
88+
shell: bash
89+
7790
- name: Upload check results
7891
if: failure()
7992
uses: actions/upload-artifact@master
8093
with:
8194
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
8295
path: check
83-
84-
- name: Test coverage
85-
if: matrix.config.os == 'macOS-latest' && matrix.config.r == '3.6'
86-
run: covr::codecov()
87-
shell: Rscript {0}

.github/workflows/pkgdown.yaml

+18-1
Original file line numberDiff line numberDiff line change
@@ -9,17 +9,34 @@ jobs:
99
runs-on: macOS-latest
1010
steps:
1111
- uses: actions/checkout@v2
12+
1213
- uses: r-lib/actions/setup-r@master
14+
1315
- uses: r-lib/actions/setup-pandoc@master
16+
17+
- name: Query dependencies
18+
run: |
19+
install.packages('remotes')
20+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
21+
shell: Rscript {0}
22+
23+
- name: Cache R packages
24+
uses: actions/cache@v1
25+
with:
26+
path: ${{ env.R_LIBS_USER }}
27+
key: macOS-r-4.0-2-${{ hashFiles('.github/depends.Rds') }}
28+
restore-keys: macOS-r-4.0-2-
29+
1430
- name: Install dependencies
1531
run: |
1632
install.packages("remotes")
1733
remotes::install_deps(dependencies = TRUE)
18-
remotes::install_github("tidyverse/tidytemplate")
1934
remotes::install_dev("pkgdown")
2035
shell: Rscript {0}
36+
2137
- name: Install package
2238
run: R CMD INSTALL .
39+
2340
- name: Deploy package
2441
run: pkgdown::deploy_to_branch(new_process = FALSE)
2542
shell: Rscript {0}

.github/workflows/pr-commands.yaml

+47
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
1+
on:
2+
issue_comment:
3+
types: [created]
4+
name: Commands
5+
jobs:
6+
document:
7+
if: startsWith(github.event.comment.body, '/document')
8+
name: document
9+
runs-on: macOS-latest
10+
steps:
11+
- uses: actions/checkout@v2
12+
- uses: r-lib/actions/pr-fetch@master
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
- uses: r-lib/actions/setup-r@master
16+
- name: Install dependencies
17+
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
18+
- name: Document
19+
run: Rscript -e 'roxygen2::roxygenise()'
20+
- name: commit
21+
run: |
22+
git add man/\* NAMESPACE
23+
git commit -m 'Document'
24+
- uses: r-lib/actions/pr-push@master
25+
with:
26+
repo-token: ${{ secrets.GITHUB_TOKEN }}
27+
style:
28+
if: startsWith(github.event.comment.body, '/style')
29+
name: style
30+
runs-on: macOS-latest
31+
steps:
32+
- uses: actions/checkout@v2
33+
- uses: r-lib/actions/pr-fetch@master
34+
with:
35+
repo-token: ${{ secrets.GITHUB_TOKEN }}
36+
- uses: r-lib/actions/setup-r@master
37+
- name: Install dependencies
38+
run: Rscript -e 'install.packages("styler")'
39+
- name: Style
40+
run: Rscript -e 'styler::style_pkg()'
41+
- name: commit
42+
run: |
43+
git add \*.R
44+
git commit -m 'Style'
45+
- uses: r-lib/actions/pr-push@master
46+
with:
47+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-coverage.yaml

+43
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
name: test-coverage
10+
11+
jobs:
12+
test-coverage:
13+
runs-on: macOS-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- uses: r-lib/actions/setup-r@master
18+
19+
- uses: r-lib/actions/setup-pandoc@master
20+
21+
- name: Query dependencies
22+
run: |
23+
install.packages('remotes')
24+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
25+
shell: Rscript {0}
26+
27+
- name: Cache R packages
28+
uses: actions/cache@v1
29+
with:
30+
path: ${{ env.R_LIBS_USER }}
31+
key: macOS-r-4.0-2-${{ hashFiles('.github/depends.Rds') }}
32+
restore-keys: macOS-r-4.0-2-
33+
34+
- name: Install dependencies
35+
run: |
36+
install.packages(c("remotes"))
37+
remotes::install_deps(dependencies = TRUE)
38+
remotes::install_cran("covr")
39+
shell: Rscript {0}
40+
41+
- name: Test coverage
42+
run: covr::codecov()
43+
shell: Rscript {0}

DESCRIPTION

+1-1
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ URL: https://dplyr.tidyverse.org,
2828
https://github.com/tidyverse/dplyr
2929
BugReports: https://github.com/tidyverse/dplyr/issues
3030
Depends:
31-
R (>= 3.2.0)
31+
R (>= 3.3.0)
3232
Imports:
3333
ellipsis,
3434
generics,

NEWS.md

+1
Original file line numberDiff line numberDiff line change
@@ -366,6 +366,7 @@
366366

367367
* `ntile()` is now more consistent with database implementations if the buckets have irregular size (#4495).
368368

369+
* Support for R 3.2.* has been dropped. The minimal R version supported is now 3.3.0
369370

370371
# dplyr 0.8.5 (2020-03-07)
371372

README.Rmd

+1
Original file line numberDiff line numberDiff line change
@@ -20,6 +20,7 @@ options(tibble.print_min = 5, tibble.print_max = 5)
2020
[![CRAN status](https://www.r-pkg.org/badges/version/dplyr)](https://cran.r-project.org/package=dplyr)
2121
[![R build status](https://github.com/tidyverse/dplyr/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/dplyr/actions?workflow=R-CMD-check)
2222
[![Codecov test coverage](https://codecov.io/gh/tidyverse/dplyr/branch/master/graph/badge.svg)](https://codecov.io/gh/tidyverse/dplyr?branch=master)
23+
[![R build status](https://github.com/tidyverse/dplyr/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/dplyr/actions)
2324
<!-- badges: end -->
2425

2526
## Overview

codecov.yml

+8-6
Original file line numberDiff line numberDiff line change
@@ -2,11 +2,13 @@ comment: false
22

33
coverage:
44
status:
5-
patch:
6-
default:
7-
target: 0
8-
threshold: 100
95
project:
106
default:
11-
target: 70
12-
threshold: 100
7+
target: auto
8+
threshold: 1%
9+
informational: true
10+
patch:
11+
default:
12+
target: auto
13+
threshold: 1%
14+
informational: true

0 commit comments

Comments
 (0)