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

Commit49e3281

Browse files
committed
improve gh actions
1 parentfeb36de commit49e3281

File tree

1 file changed

+63
-5
lines changed

1 file changed

+63
-5
lines changed

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

Lines changed: 63 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,24 +1,82 @@
1+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
2+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
13
on:
24
push:
35
branches:
4-
-master
6+
-main
57
pull_request:
68
branches:
7-
-master
9+
-main
810

911
name:R-CMD-check
1012

1113
jobs:
1214
R-CMD-check:
13-
runs-on:macOS-latest
15+
runs-on:${{ matrix.config.os }}
16+
17+
name:${{ matrix.config.os }} (${{ matrix.config.r }})
18+
19+
strategy:
20+
fail-fast:false
21+
matrix:
22+
config:
23+
-{os: windows-latest, r: 'release'}
24+
-{os: macOS-latest, r: 'release'}
25+
-{os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
26+
-{os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
27+
28+
env:
29+
R_REMOTES_NO_ERRORS_FROM_WARNINGS:true
30+
RSPM:${{ matrix.config.rspm }}
31+
GITHUB_PAT:${{ secrets.GITHUB_TOKEN }}
32+
1433
steps:
1534
-uses:actions/checkout@v2
35+
1636
-uses:r-lib/actions/setup-r@master
37+
with:
38+
r-version:${{ matrix.config.r }}
39+
40+
-uses:r-lib/actions/setup-pandoc@master
41+
42+
-name:Query dependencies
43+
run:|
44+
install.packages('remotes')
45+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
46+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
47+
shell:Rscript {0}
48+
49+
-name:Cache R packages
50+
if:runner.os != 'Windows'
51+
uses:actions/cache@v2
52+
with:
53+
path:${{ env.R_LIBS_USER }}
54+
key:${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
55+
restore-keys:${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
56+
57+
-name:Install system dependencies
58+
if:runner.os == 'Linux'
59+
run:|
60+
while read -r cmd
61+
do
62+
eval sudo $cmd
63+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
64+
1765
-name:Install dependencies
1866
run:|
19-
install.packages(c("remotes", "rcmdcheck"))
2067
remotes::install_deps(dependencies = TRUE)
68+
remotes::install_cran("rcmdcheck")
2169
shell:Rscript {0}
70+
2271
-name:Check
23-
run:rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
72+
env:
73+
_R_CHECK_CRAN_INCOMING_REMOTE_:false
74+
run:rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
2475
shell:Rscript {0}
76+
77+
-name:Upload check results
78+
if:failure()
79+
uses:actions/upload-artifact@main
80+
with:
81+
name:${{ runner.os }}-r${{ matrix.config.r }}-results
82+
path:check

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp