Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Commitb2b7722

Browse files
committed
Revert to original fork, added ropensci metadata and github actions
1 parent340174a commitb2b7722

File tree

6 files changed

+456
-0
lines changed

6 files changed

+456
-0
lines changed

‎.github/.gitignore‎

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

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

Lines changed: 108 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,108 @@
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
7+
on:
8+
push:
9+
branches:
10+
-main
11+
-master
12+
pull_request:
13+
branches:
14+
-main
15+
-master
16+
17+
name:R-CMD-check
18+
19+
jobs:
20+
R-CMD-check:
21+
runs-on:${{ matrix.config.os }}
22+
23+
name:${{ matrix.config.os }} (${{ matrix.config.r }})
24+
25+
strategy:
26+
fail-fast:false
27+
matrix:
28+
config:
29+
-{os: macOS-latest, r: 'release'}
30+
-{os: windows-latest, r: 'release'}
31+
-{os: windows-latest, r: '3.6'}
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.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
36+
-{os: ubuntu-18.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
37+
-{os: ubuntu-18.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
38+
39+
env:
40+
R_REMOTES_NO_ERRORS_FROM_WARNINGS:true
41+
RSPM:${{ matrix.config.rspm }}
42+
GITHUB_PAT:${{ secrets.GITHUB_TOKEN }}
43+
44+
steps:
45+
-uses:actions/checkout@v2
46+
47+
-uses:r-lib/actions/setup-r@v1
48+
with:
49+
r-version:${{ matrix.config.r }}
50+
http-user-agent:${{ matrix.config.http-user-agent }}
51+
52+
-uses:r-lib/actions/setup-pandoc@v1
53+
54+
-name:Query dependencies
55+
run:|
56+
install.packages('remotes')
57+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
58+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
59+
shell:Rscript {0}
60+
61+
-name:Restore R package cache
62+
if:runner.os != 'Windows'
63+
uses:actions/cache@v2
64+
with:
65+
path:${{ env.R_LIBS_USER }}
66+
key:${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
67+
restore-keys:${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
68+
69+
-name:Install system dependencies
70+
if:runner.os == 'Linux'
71+
run:|
72+
while read -r cmd
73+
do
74+
eval sudo $cmd
75+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "16.04"))')
76+
77+
-name:Install dependencies
78+
run:|
79+
remotes::install_deps(dependencies = TRUE)
80+
remotes::install_cran("rcmdcheck")
81+
shell:Rscript {0}
82+
83+
-name:Session info
84+
run:|
85+
options(width = 100)
86+
pkgs <- installed.packages()[, "Package"]
87+
sessioninfo::session_info(pkgs, include_base = TRUE)
88+
shell:Rscript {0}
89+
90+
-name:Check
91+
env:
92+
_R_CHECK_CRAN_INCOMING_:false
93+
run:|
94+
options(crayon.enabled = TRUE)
95+
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
96+
shell:Rscript {0}
97+
98+
-name:Show testthat output
99+
if:always()
100+
run:find check -name 'testthat.Rout*' -exec cat '{}' \; || true
101+
shell:bash
102+
103+
-name:Upload check results
104+
if:failure()
105+
uses:actions/upload-artifact@main
106+
with:
107+
name:${{ runner.os }}-r${{ matrix.config.r }}-results
108+
path:check

‎.github/workflows/pkgdown.yaml‎

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
push:
3+
branches:
4+
-main
5+
-master
6+
7+
name:pkgdown
8+
9+
jobs:
10+
pkgdown:
11+
runs-on:macOS-latest
12+
env:
13+
GITHUB_PAT:${{ secrets.GITHUB_TOKEN }}
14+
steps:
15+
-uses:actions/checkout@v2
16+
17+
-uses:r-lib/actions/setup-r@v1
18+
19+
-uses:r-lib/actions/setup-pandoc@v1
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+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
26+
shell:Rscript {0}
27+
28+
-name:Restore R package cache
29+
uses:actions/cache@v2
30+
with:
31+
path:${{ env.R_LIBS_USER }}
32+
key:${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
33+
restore-keys:${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
34+
35+
-name:Install dependencies
36+
run:|
37+
remotes::install_deps(dependencies = TRUE)
38+
install.packages("pkgdown", type = "binary")
39+
shell:Rscript {0}
40+
41+
-name:Install package
42+
run:R CMD INSTALL .
43+
44+
-name:Deploy package
45+
run:|
46+
git config --local user.email "actions@github.com"
47+
git config --local user.name "GitHub Actions"
48+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

‎.github/workflows/pr-commands.yaml‎

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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+
env:
11+
GITHUB_PAT:${{ secrets.GITHUB_TOKEN }}
12+
steps:
13+
-uses:actions/checkout@v2
14+
-uses:r-lib/actions/pr-fetch@v1
15+
with:
16+
repo-token:${{ secrets.GITHUB_TOKEN }}
17+
-uses:r-lib/actions/setup-r@v1
18+
-name:Install dependencies
19+
run:Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
20+
-name:Document
21+
run:Rscript -e 'roxygen2::roxygenise()'
22+
-name:commit
23+
run:|
24+
git config --local user.email "actions@github.com"
25+
git config --local user.name "GitHub Actions"
26+
git add man/\* NAMESPACE
27+
git commit -m 'Document'
28+
-uses:r-lib/actions/pr-push@v1
29+
with:
30+
repo-token:${{ secrets.GITHUB_TOKEN }}
31+
style:
32+
if:startsWith(github.event.comment.body, '/style')
33+
name:style
34+
runs-on:macOS-latest
35+
env:
36+
GITHUB_PAT:${{ secrets.GITHUB_TOKEN }}
37+
steps:
38+
-uses:actions/checkout@v2
39+
-uses:r-lib/actions/pr-fetch@v1
40+
with:
41+
repo-token:${{ secrets.GITHUB_TOKEN }}
42+
-uses:r-lib/actions/setup-r@v1
43+
-name:Install dependencies
44+
run:Rscript -e 'install.packages("styler")'
45+
-name:Style
46+
run:Rscript -e 'styler::style_pkg()'
47+
-name:commit
48+
run:|
49+
git config --local user.email "actions@github.com"
50+
git config --local user.name "GitHub Actions"
51+
git add \*.R
52+
git commit -m 'Style'
53+
-uses:r-lib/actions/pr-push@v1
54+
with:
55+
repo-token:${{ secrets.GITHUB_TOKEN }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
push:
3+
branches:
4+
-main
5+
-master
6+
pull_request:
7+
branches:
8+
-main
9+
-master
10+
11+
name:test-coverage
12+
13+
jobs:
14+
test-coverage:
15+
runs-on:macOS-latest
16+
env:
17+
GITHUB_PAT:${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
-uses:actions/checkout@v2
20+
21+
-uses:r-lib/actions/setup-r@v1
22+
23+
-uses:r-lib/actions/setup-pandoc@v1
24+
25+
-name:Query dependencies
26+
run:|
27+
install.packages('remotes')
28+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
29+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
30+
shell:Rscript {0}
31+
32+
-name:Restore R package cache
33+
uses:actions/cache@v2
34+
with:
35+
path:${{ env.R_LIBS_USER }}
36+
key:${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
37+
restore-keys:${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
38+
39+
-name:Install dependencies
40+
run:|
41+
install.packages(c("remotes"))
42+
remotes::install_deps(dependencies = TRUE)
43+
remotes::install_cran("covr")
44+
shell:Rscript {0}
45+
46+
-name:Test coverage
47+
run:covr::coveralls()
48+
shell:Rscript {0}

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp