Skip to content

Commit ec8a917

Browse files
authored
Workflow updates (#4747)
* use_tidy_description() * use_tidy_github_actions() * Update website
1 parent c89c265 commit ec8a917

File tree

6 files changed

+112
-135
lines changed

6 files changed

+112
-135
lines changed

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

Lines changed: 34 additions & 63 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
#
44
# NOTE: This workflow is overkill for most R packages and
@@ -12,10 +12,6 @@ on:
1212

1313
name: R-CMD-check
1414

15-
# Increment this version when we want to clear cache
16-
env:
17-
cache-version: v6
18-
1915
jobs:
2016
R-CMD-check:
2117
runs-on: ${{ matrix.config.os }}
@@ -26,78 +22,53 @@ jobs:
2622
fail-fast: false
2723
matrix:
2824
config:
29-
- {os: windows-latest, r: '4.1', vdiffr: true, xref: true}
30-
- {os: macOS-latest, r: '4.1', vdiffr: true, xref: true}
31-
- {os: ubuntu-18.04, r: 'devel', vdiffr: false, xref: true}
32-
- {os: ubuntu-18.04, r: '4.1', vdiffr: true, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
33-
- {os: ubuntu-18.04, r: '4.0', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
34-
- {os: ubuntu-18.04, r: '3.6', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
35-
- {os: ubuntu-18.04, r: '3.5', vdiffr: false, xref: true, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
36-
- {os: ubuntu-18.04, r: '3.4', vdiffr: false, xref: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
37-
- {os: ubuntu-18.04, r: '3.3', vdiffr: false, xref: false, rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
25+
- {os: macOS-latest, r: 'release'}
26+
27+
- {os: windows-latest, r: 'release'}
28+
# Use 3.6 to trigger usage of RTools35
29+
- {os: windows-latest, r: '3.6'}
30+
31+
# Use latest ubuntu to make it easier to install sf dependencies
32+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
33+
- {os: ubuntu-latest, r: 'release'}
34+
- {os: ubuntu-latest, r: 'oldrel-1'}
35+
- {os: ubuntu-latest, r: 'oldrel-2'}
36+
- {os: ubuntu-latest, r: 'oldrel-3'}
37+
- {os: ubuntu-latest, r: 'oldrel-4'}
3838

3939
env:
40-
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
41-
RSPM: ${{ matrix.config.rspm }}
42-
# don't treat missing suggested packages as error
40+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
41+
R_KEEP_PKG_SOURCE: yes
4342
_R_CHECK_FORCE_SUGGESTS_: false
4443
# Some packages might unavailable on the older versions, so let's ignore xref warnings
45-
_R_CHECK_RD_XREFS_: ${{ matrix.config.xref }}
44+
_R_CHECK_RD_XREFS_: false
4645
# Runs vdiffr test only on the latest version of R
47-
VDIFFR_RUN_TESTS: ${{ matrix.config.vdiffr }}
46+
VDIFFR_RUN_TESTS: ${{ matrix.config.r == 'release' }}
4847
VDIFFR_LOG_PATH: "../vdiffr.Rout.fail"
4948

5049
steps:
5150
- uses: actions/checkout@v2
5251

53-
- uses: r-lib/actions/setup-r@master
52+
- uses: r-lib/actions/setup-pandoc@v2
53+
54+
- uses: r-lib/actions/setup-r@v2
5455
with:
5556
r-version: ${{ matrix.config.r }}
5657
http-user-agent: ${{ matrix.config.http-user-agent }}
58+
use-public-rspm: true
5759

58-
- uses: r-lib/actions/setup-pandoc@master
59-
60-
- name: Query dependencies
61-
run: |
62-
install.packages('remotes')
63-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
64-
shell: Rscript {0}
65-
66-
- name: Cache R packages
67-
if: runner.os != 'Windows'
68-
uses: actions/cache@v1
60+
- uses: r-lib/actions/setup-r-dependencies@v2
6961
with:
70-
path: ${{ env.R_LIBS_USER }}
71-
key: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
72-
restore-keys: ${{ env.cache-version }}-${{ runner.os }}-r-${{ matrix.config.r }}-
73-
74-
- name: Install system dependencies on Linux
75-
if: runner.os == 'Linux'
76-
run: |
77-
while read -r cmd
78-
do
79-
eval sudo $cmd
80-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "18.04"))')
81-
- name: Install system dependencies on macOS
82-
if: runner.os == 'macOS'
83-
run: |
84-
# XQuartz is needed by vdiffr
85-
brew install xquartz
86-
# Use only binary packages
87-
echo 'options(pkgType = "binary")' >> ~/.Rprofile
88-
- name: Install dependencies
89-
run: |
90-
remotes::install_deps(dependencies = TRUE)
91-
remotes::install_cran("rcmdcheck")
92-
shell: Rscript {0}
93-
94-
- name: Check
95-
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
96-
shell: Rscript {0}
62+
extra-packages: >
63+
any::rcmdcheck,
64+
maps=?ignore-before-r=3.5.0,
65+
Hmisc=?ignore-before-r=3.6.0,
66+
mapproj=?ignore-before-r=3.5.0,
67+
multcomp=?ignore-before-r=3.5.0,
68+
quantreg=?ignore-before-r=3.5.0,
69+
interp=?ignore-before-r=3.5.0
70+
needs: check
9771

98-
- name: Upload check results
99-
if: failure()
100-
uses: actions/upload-artifact@master
72+
- uses: r-lib/actions/check-r-package@v2
10173
with:
102-
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
103-
path: check
74+
upload-snapshots: true

.github/workflows/pkgdown.yaml

Lines changed: 24 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -1,34 +1,46 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
5-
types: [published]
65
branches: [main, master]
7-
tags: ['*']
6+
pull_request:
7+
branches: [main, master]
8+
release:
9+
types: [published]
10+
workflow_dispatch:
811

912
name: pkgdown
1013

1114
jobs:
1215
pkgdown:
1316
runs-on: ubuntu-latest
17+
# Only restrict concurrency for non-PR jobs
18+
concurrency:
19+
group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }}
1420
env:
1521
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1622
steps:
1723
- uses: actions/checkout@v2
1824

19-
- uses: r-lib/actions/setup-pandoc@v1
25+
- uses: r-lib/actions/setup-pandoc@v2
2026

21-
- uses: r-lib/actions/setup-r@v1
27+
- uses: r-lib/actions/setup-r@v2
2228
with:
2329
use-public-rspm: true
2430

25-
- uses: r-lib/actions/setup-r-dependencies@v1
31+
- uses: r-lib/actions/setup-r-dependencies@v2
2632
with:
27-
extra-packages: pkgdown
33+
extra-packages: any::pkgdown, local::.
2834
needs: website
2935

30-
- name: Deploy package
31-
run: |
32-
git config --local user.name "$GITHUB_ACTOR"
33-
git config --local user.email "[email protected]"
34-
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
36+
- name: Build site
37+
run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE)
38+
shell: Rscript {0}
39+
40+
- name: Deploy to GitHub pages 🚀
41+
if: github.event_name != 'pull_request'
42+
uses: JamesIves/[email protected]
43+
with:
44+
clean: false
45+
branch: gh-pages
46+
folder: docs

.github/workflows/pr-commands.yaml

Lines changed: 18 additions & 14 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
issue_comment:
@@ -8,28 +8,30 @@ name: Commands
88

99
jobs:
1010
document:
11-
if: startsWith(github.event.comment.body, '/document')
11+
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/document') }}
1212
name: document
1313
runs-on: ubuntu-latest
1414
env:
1515
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1616
steps:
1717
- uses: actions/checkout@v2
1818

19-
- uses: r-lib/actions/pr-fetch@v1
19+
- uses: r-lib/actions/pr-fetch@v2
2020
with:
2121
repo-token: ${{ secrets.GITHUB_TOKEN }}
2222

23-
- uses: r-lib/actions/setup-r@v1
23+
- uses: r-lib/actions/setup-r@v2
2424
with:
2525
use-public-rspm: true
2626

27-
- uses: r-lib/actions/setup-r-dependencies@v1
27+
- uses: r-lib/actions/setup-r-dependencies@v2
2828
with:
29-
extra-packages: roxygen2
29+
extra-packages: any::roxygen2
30+
needs: pr-document
3031

3132
- name: Document
32-
run: Rscript -e 'roxygen2::roxygenise()'
33+
run: roxygen2::roxygenise()
34+
shell: Rscript {0}
3335

3436
- name: commit
3537
run: |
@@ -38,30 +40,32 @@ jobs:
3840
git add man/\* NAMESPACE
3941
git commit -m 'Document'
4042
41-
- uses: r-lib/actions/pr-push@v1
43+
- uses: r-lib/actions/pr-push@v2
4244
with:
4345
repo-token: ${{ secrets.GITHUB_TOKEN }}
4446

4547
style:
46-
if: startsWith(github.event.comment.body, '/style')
48+
if: ${{ github.event.issue.pull_request && (github.event.comment.author_association == 'MEMBER' || github.event.comment.author_association == 'OWNER') && startsWith(github.event.comment.body, '/style') }}
4749
name: style
4850
runs-on: ubuntu-latest
4951
env:
5052
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
5153
steps:
5254
- uses: actions/checkout@v2
5355

54-
- uses: r-lib/actions/pr-fetch@v1
56+
- uses: r-lib/actions/pr-fetch@v2
5557
with:
5658
repo-token: ${{ secrets.GITHUB_TOKEN }}
5759

58-
- uses: r-lib/actions/setup-r@v1
60+
- uses: r-lib/actions/setup-r@v2
5961

6062
- name: Install dependencies
61-
run: Rscript -e 'install.packages("styler")'
63+
run: install.packages("styler")
64+
shell: Rscript {0}
6265

6366
- name: Style
64-
run: Rscript -e 'styler::style_pkg()'
67+
run: styler::style_pkg()
68+
shell: Rscript {0}
6569

6670
- name: commit
6771
run: |
@@ -70,6 +74,6 @@ jobs:
7074
git add \*.R
7175
git commit -m 'Style'
7276
73-
- uses: r-lib/actions/pr-push@v1
77+
- uses: r-lib/actions/pr-push@v2
7478
with:
7579
repo-token: ${{ secrets.GITHUB_TOKEN }}

.github/workflows/test-coverage.yaml

Lines changed: 6 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,4 @@
1-
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
22
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
33
on:
44
push:
@@ -17,14 +17,15 @@ jobs:
1717
steps:
1818
- uses: actions/checkout@v2
1919

20-
- uses: r-lib/actions/setup-r@v1
20+
- uses: r-lib/actions/setup-r@v2
2121
with:
2222
use-public-rspm: true
2323

24-
- uses: r-lib/actions/setup-r-dependencies@v1
24+
- uses: r-lib/actions/setup-r-dependencies@v2
2525
with:
26-
extra-packages: covr
26+
extra-packages: any::covr
27+
needs: coverage
2728

2829
- name: Test coverage
29-
run: covr::codecov()
30+
run: covr::codecov(quiet = FALSE)
3031
shell: Rscript {0}

DESCRIPTION

Lines changed: 24 additions & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -1,18 +1,14 @@
11
Package: ggplot2
2-
Version: 3.3.5.9000
32
Title: Create Elegant Data Visualisations Using the Grammar of Graphics
4-
Description: A system for 'declaratively' creating graphics,
5-
based on "The Grammar of Graphics". You provide the data, tell 'ggplot2'
6-
how to map variables to aesthetics, what graphical primitives to use,
7-
and it takes care of the details.
3+
Version: 3.3.5.9000
84
Authors@R: c(
9-
person("Hadley", "Wickham", , "[email protected]", "aut",
5+
person("Hadley", "Wickham", , "[email protected]", role = "aut",
106
comment = c(ORCID = "0000-0003-4757-117X")),
11-
person("Winston", "Chang", , role = "aut",
7+
person("Winston", "Chang", role = "aut",
128
comment = c(ORCID = "0000-0002-1576-2126")),
13-
person("Lionel", "Henry", , role = "aut"),
14-
person("Thomas Lin", "Pedersen", , "[email protected]",
15-
role = c("aut", "cre"), comment = c(ORCID = "0000-0002-5147-4711")),
9+
person("Lionel", "Henry", role = "aut"),
10+
person("Thomas Lin", "Pedersen", , "[email protected]", role = c("aut", "cre"),
11+
comment = c(ORCID = "0000-0002-5147-4711")),
1612
person("Kohske", "Takahashi", role = "aut"),
1713
person("Claus", "Wilke", role = "aut",
1814
comment = c(ORCID = "0000-0002-7470-9261")),
@@ -23,7 +19,14 @@ Authors@R: c(
2319
person("Dewey", "Dunnington", role = "aut",
2420
comment = c(ORCID = "0000-0002-9415-4582")),
2521
person("RStudio", role = c("cph", "fnd"))
26-
)
22+
)
23+
Description: A system for 'declaratively' creating graphics, based on "The
24+
Grammar of Graphics". You provide the data, tell 'ggplot2' how to map
25+
variables to aesthetics, what graphical primitives to use, and it
26+
takes care of the details.
27+
License: MIT + file LICENSE
28+
URL: https://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2
29+
BugReports: https://github.com/tidyverse/ggplot2/issues
2730
Depends:
2831
R (>= 3.3)
2932
Imports:
@@ -42,7 +45,6 @@ Imports:
4245
withr (>= 2.0.0)
4346
Suggests:
4447
covr,
45-
ragg,
4648
dplyr,
4749
ggplot2movies,
4850
hexbin,
@@ -58,6 +60,7 @@ Suggests:
5860
nlme,
5961
profvis,
6062
quantreg,
63+
ragg,
6164
RColorBrewer,
6265
rgeos,
6366
rmarkdown,
@@ -67,11 +70,16 @@ Suggests:
6770
testthat (>= 3.0.0),
6871
vdiffr (>= 1.0.0),
6972
xml2
70-
Enhances: sp
71-
License: MIT + file LICENSE
72-
URL: https://ggplot2.tidyverse.org, https://github.com/tidyverse/ggplot2
73-
BugReports: https://github.com/tidyverse/ggplot2/issues
73+
Enhances:
74+
sp
75+
VignetteBuilder:
76+
knitr
77+
Config/Needs/website: ggtext, tidyr, forcats, tidyverse/tidytemplate
78+
Config/testthat/edition: 3
79+
Encoding: UTF-8
7480
LazyData: true
81+
Roxygen: list(markdown = TRUE)
82+
RoxygenNote: 7.1.1
7583
Collate:
7684
'ggproto.r'
7785
'ggplot-global.R'
@@ -265,13 +273,3 @@ Collate:
265273
'utilities-tidy-eval.R'
266274
'zxx.r'
267275
'zzz.r'
268-
VignetteBuilder: knitr
269-
RoxygenNote: 7.1.1
270-
Roxygen: list(markdown = TRUE)
271-
Encoding: UTF-8
272-
Config/Needs/website:
273-
ggtext,
274-
tidyr,
275-
forcats,
276-
tidyverse/tidytemplate
277-
Config/testthat/edition: 3

0 commit comments

Comments
 (0)