Skip to content

Commit 9d11ad9

Browse files
authored
Merge pull request #30 from IndrajeetPatil/upgrate_to_gha_v2
2 parents f39bc3c + c6f26dd commit 9d11ad9

File tree

14 files changed

+236
-260
lines changed

14 files changed

+236
-260
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
^cran-comments\.md$
1212
^.github$
1313
^\.github$
14+
^codecov\.yml$

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

Lines changed: 60 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,60 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
#
4+
# NOTE: This workflow is overkill for most R packages and
5+
# check-standard.yaml is likely a better choice.
6+
# usethis::use_github_action("check-standard") will install it.
7+
on:
8+
push:
9+
branches: [main, master]
10+
pull_request:
11+
branches: [main, master]
12+
13+
name: R-CMD-check
14+
15+
jobs:
16+
R-CMD-check:
17+
runs-on: ${{ matrix.config.os }}
18+
19+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
config:
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+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
32+
- {os: ubuntu-latest, r: 'release'}
33+
- {os: ubuntu-latest, r: 'oldrel-1'}
34+
- {os: ubuntu-latest, r: 'oldrel-2'}
35+
- {os: ubuntu-latest, r: 'oldrel-3'}
36+
- {os: ubuntu-latest, r: 'oldrel-4'}
37+
38+
env:
39+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
40+
R_KEEP_PKG_SOURCE: yes
41+
42+
steps:
43+
- uses: actions/checkout@v2
44+
45+
- uses: r-lib/actions/setup-pandoc@v2
46+
47+
- uses: r-lib/actions/setup-r@v2
48+
with:
49+
r-version: ${{ matrix.config.r }}
50+
http-user-agent: ${{ matrix.config.http-user-agent }}
51+
use-public-rspm: true
52+
53+
- uses: r-lib/actions/setup-r-dependencies@v2
54+
with:
55+
extra-packages: any::rcmdcheck
56+
needs: check
57+
58+
- uses: r-lib/actions/check-r-package@v2
59+
with:
60+
upload-snapshots: true

.github/workflows/check-pak.yaml

Lines changed: 0 additions & 112 deletions
This file was deleted.

.github/workflows/main.yml

Lines changed: 0 additions & 30 deletions
This file was deleted.

.github/workflows/pkgdown-pak.yaml

Lines changed: 0 additions & 59 deletions
This file was deleted.

.github/workflows/pkgdown.yaml

Lines changed: 46 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main, master]
6+
pull_request:
7+
branches: [main, master]
8+
release:
9+
types: [published]
10+
workflow_dispatch:
11+
12+
name: pkgdown
13+
14+
jobs:
15+
pkgdown:
16+
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 }}
20+
env:
21+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
22+
steps:
23+
- uses: actions/checkout@v2
24+
25+
- uses: r-lib/actions/setup-pandoc@v2
26+
27+
- uses: r-lib/actions/setup-r@v2
28+
with:
29+
use-public-rspm: true
30+
31+
- uses: r-lib/actions/setup-r-dependencies@v2
32+
with:
33+
extra-packages: any::pkgdown, local::.
34+
needs: website
35+
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/github-pages-deploy-action@4.1.4
43+
with:
44+
clean: false
45+
branch: gh-pages
46+
folder: docs

.github/workflows/pr-commands.yaml

Lines changed: 79 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,79 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
issue_comment:
5+
types: [created]
6+
7+
name: Commands
8+
9+
jobs:
10+
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') }}
12+
name: document
13+
runs-on: ubuntu-latest
14+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- uses: r-lib/actions/pr-fetch@v2
20+
with:
21+
repo-token: ${{ secrets.GITHUB_TOKEN }}
22+
23+
- uses: r-lib/actions/setup-r@v2
24+
with:
25+
use-public-rspm: true
26+
27+
- uses: r-lib/actions/setup-r-dependencies@v2
28+
with:
29+
extra-packages: any::roxygen2
30+
needs: pr-document
31+
32+
- name: Document
33+
run: roxygen2::roxygenise()
34+
shell: Rscript {0}
35+
36+
- name: commit
37+
run: |
38+
git config --local user.name "$GITHUB_ACTOR"
39+
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
40+
git add man/\* NAMESPACE
41+
git commit -m 'Document'
42+
43+
- uses: r-lib/actions/pr-push@v2
44+
with:
45+
repo-token: ${{ secrets.GITHUB_TOKEN }}
46+
47+
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') }}
49+
name: style
50+
runs-on: ubuntu-latest
51+
env:
52+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
53+
steps:
54+
- uses: actions/checkout@v2
55+
56+
- uses: r-lib/actions/pr-fetch@v2
57+
with:
58+
repo-token: ${{ secrets.GITHUB_TOKEN }}
59+
60+
- uses: r-lib/actions/setup-r@v2
61+
62+
- name: Install dependencies
63+
run: install.packages("styler")
64+
shell: Rscript {0}
65+
66+
- name: Style
67+
run: styler::style_pkg()
68+
shell: Rscript {0}
69+
70+
- name: commit
71+
run: |
72+
git config --local user.name "$GITHUB_ACTOR"
73+
git config --local user.email "$GITHUB_ACTOR@users.noreply.github.com"
74+
git add \*.R
75+
git commit -m 'Style'
76+
77+
- uses: r-lib/actions/pr-push@v2
78+
with:
79+
repo-token: ${{ secrets.GITHUB_TOKEN }}

0 commit comments

Comments
 (0)