Skip to content

Commit fdcf2df

Browse files
committed
Update github actions
1 parent d58fa88 commit fdcf2df

File tree

5 files changed

+53
-34
lines changed

5 files changed

+53
-34
lines changed

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

+9-6
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
@@ -43,16 +43,19 @@ jobs:
4343
steps:
4444
- uses: actions/checkout@v2
4545

46-
- uses: r-lib/actions/setup-pandoc@v1
46+
- uses: r-lib/actions/setup-pandoc@v2
4747

48-
- uses: r-lib/actions/setup-r@v1
48+
- uses: r-lib/actions/setup-r@v2
4949
with:
5050
r-version: ${{ matrix.config.r }}
5151
http-user-agent: ${{ matrix.config.http-user-agent }}
5252
use-public-rspm: true
5353

54-
- uses: r-lib/actions/setup-r-dependencies@v1
54+
- uses: r-lib/actions/setup-r-dependencies@v2
5555
with:
56-
extra-packages: rcmdcheck
56+
extra-packages: any::rcmdcheck
57+
needs: check
5758

58-
- uses: r-lib/actions/check-r-package@v1
59+
- uses: r-lib/actions/check-r-package@v2
60+
with:
61+
upload-snapshots: true

.github/workflows/pkgdown.yaml

+21-10
Original file line numberDiff line numberDiff line change
@@ -1,8 +1,10 @@
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:
55
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
68
release:
79
types: [published]
810
workflow_dispatch:
@@ -12,24 +14,33 @@ name: pkgdown
1214
jobs:
1315
pkgdown:
1416
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 }}
1520
env:
1621
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1722
steps:
1823
- uses: actions/checkout@v2
1924

20-
- uses: r-lib/actions/setup-pandoc@v1
25+
- uses: r-lib/actions/setup-pandoc@v2
2126

22-
- uses: r-lib/actions/setup-r@v1
27+
- uses: r-lib/actions/setup-r@v2
2328
with:
2429
use-public-rspm: true
2530

26-
- uses: r-lib/actions/setup-r-dependencies@v1
31+
- uses: r-lib/actions/setup-r-dependencies@v2
2732
with:
28-
extra-packages: pkgdown
33+
extra-packages: any::pkgdown, local::.
2934
needs: website
3035

31-
- name: Deploy package
32-
run: |
33-
git config --local user.name "$GITHUB_ACTOR"
34-
git config --local user.email "[email protected]"
35-
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

+16-12
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:
@@ -16,20 +16,22 @@ jobs:
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,7 +40,7 @@ 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

@@ -51,17 +53,19 @@ jobs:
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

+6-5
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}

README.md

+1-1
Original file line numberDiff line numberDiff line change
@@ -2,9 +2,9 @@ rlang <img src="man/figures/logo.png" align="right" />
22
=======================================================
33

44
<!-- badges: start -->
5-
[![R-CMD-check](https://github.com/r-lib/rlang/workflows/R-CMD-check/badge.svg)](https://github.com/r-lib/rlang/actions)
65
[![Codecov test coverage](https://codecov.io/gh/r-lib/rlang/branch/main/graph/badge.svg)](https://app.codecov.io/gh/r-lib/rlang?branch=main)
76
[![Lifecycle Status](https://img.shields.io/badge/lifecycle-stable-green.svg)](https://lifecycle.r-lib.org/articles/stages.html)
7+
[![R-CMD-check](https://github.com/r-lib/rlang/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/r-lib/rlang/actions/workflows/R-CMD-check.yaml)
88
<!-- badges: end -->
99

1010

0 commit comments

Comments
 (0)