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

Commit212799b

Browse files
committed
update check action
1 parentb40d607 commit212799b

File tree

6 files changed

+25
-255
lines changed

6 files changed

+25
-255
lines changed

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

Lines changed: 18 additions & 72 deletions
Original file line numberDiff line numberDiff line change
@@ -1,20 +1,10 @@
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
71
on:
82
push:
9-
branches:
10-
-main
11-
-master
3+
branches:[main, master]
124
pull_request:
13-
branches:
14-
-main
15-
-master
5+
branches:[main, master]
166

17-
name:R-CMD-check
7+
name:RCMD Check
188

199
jobs:
2010
R-CMD-check:
@@ -28,80 +18,36 @@ jobs:
2818
config:
2919
-{os: macOS-latest, r: 'release'}
3020
-{os: windows-latest, r: 'release'}
31-
-{os: windows-latest, r: '3.6'}
32-
-{os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
33-
-{os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
34-
-{os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
35-
-{os: ubuntu-20.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
21+
-{os: ubuntu-latest, r: 'release'}
22+
3623
env:
37-
R_REMOTES_NO_ERRORS_FROM_WARNINGS:true
38-
RSPM:${{ matrix.config.rspm }}
3924
GITHUB_PAT:${{ secrets.GITHUB_TOKEN }}
25+
R_KEEP_PKG_SOURCE:yes
4026

4127
steps:
4228
-uses:actions/checkout@v2
4329

44-
-uses:r-lib/actions/setup-r@v1
30+
-uses:r-lib/actions/setup-r@v2
4531
with:
4632
r-version:${{ matrix.config.r }}
4733
http-user-agent:${{ matrix.config.http-user-agent }}
34+
use-public-rspm:true
4835

49-
-uses:r-lib/actions/setup-pandoc@v1
50-
51-
-name:Query dependencies
52-
run:|
53-
install.packages('remotes')
54-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
55-
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
56-
shell:Rscript {0}
57-
58-
-name:Restore R package cache
59-
if:runner.os != 'Windows'
60-
uses:actions/cache@v2
36+
-uses:r-lib/actions/setup-r-dependencies@v2
6137
with:
62-
path:${{ env.R_LIBS_USER }}
63-
key:${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
64-
restore-keys:${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
65-
66-
-name:Install system dependencies
67-
if:runner.os == 'Linux'
68-
run:|
69-
while read -r cmd
70-
do
71-
eval sudo $cmd
72-
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "16.04"))')
73-
74-
-name:Install dependencies
75-
run:|
76-
remotes::install_deps(dependencies = TRUE)
77-
remotes::install_github("r-spatial/sf", configure.args = "--with-proj-lib=/usr/local/lib/")
78-
remotes::install_cran("rcmdcheck")
79-
remotes::install_cran("sessioninfo")
80-
shell:Rscript {0}
81-
82-
-name:Session info
83-
run:|
84-
options(width = 100)
85-
pkgs <- installed.packages()[, "Package"]
86-
sessioninfo::session_info(pkgs, include_base = TRUE)
87-
shell:Rscript {0}
38+
extra-packages:any::rcmdcheck
39+
needs:check
8840

8941
-name:Check
90-
env:
91-
_R_CHECK_CRAN_INCOMING_:false
92-
run:|
93-
options(crayon.enabled = TRUE)
94-
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
42+
run:rcmdcheck::rcmdcheck(args = c("--ignore-vignettes", "--no-manual", "--no-tests"),
43+
build_args = c("--no-build-vignettes"),
44+
error_on = "error",
45+
check_dir = "check")
9546
shell:Rscript {0}
96-
97-
-name:Show testthat output
98-
if:always()
99-
run:find check -name 'testthat.Rout*' -exec cat '{}' \; || true
100-
shell:bash
101-
47+
10248
-name:Upload check results
10349
if:failure()
104-
uses:actions/upload-artifact@main
50+
uses:actions/upload-artifact@master
10551
with:
106-
name:${{ runner.os }}-r${{ matrix.config.r }}-results
52+
name:results
10753
path:check

‎.github/workflows/pkgdown.yaml‎

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

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

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

‎.github/workflows/test-coverage.yaml‎

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

‎R/geoCode.R‎

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -30,7 +30,7 @@ geocodeOSM <- function(location, pt = FALSE, bb = FALSE,
3030
stop("Only pt, bb, or all can be TRUE. Leave others as FALSE")
3131
}
3232

33-
if (class(location)!="character") {
33+
if (!inherits(location,"character")) {
3434
stop(paste(
3535
"",
3636
"Input location is not a place name.",

‎tests/testthat/test_aoi.R‎

Lines changed: 6 additions & 23 deletions
Original file line numberDiff line numberDiff line change
@@ -1,30 +1,15 @@
11
context("aoi functions")
22

33
test_that("aoi_get errors...", {
4-
expect_error(
5-
aoi_get(state="CA",x="UCSB"),
6-
"Only 'state' or 'x' can be used. Set the other to NULL"
7-
)
4+
expect_error(aoi_get(state="CA",x="UCSB"))
85

9-
expect_error(
10-
aoi_get(state=10),
11-
"State must be a character value."
12-
)
6+
expect_error( aoi_get(state=10) )
137

14-
expect_error(
15-
aoi_get(state="TweedleDee"),
16-
"State not recognized. Full names, regions, or abbreviations can be used."
17-
)
8+
expect_error( aoi_get(state="TweedleDee") )
189

19-
expect_error(
20-
aoi_get(county="Santa Barbara"),
21-
"The use of 'county' requires a 'state' parameter."
22-
)
10+
expect_error( aoi_get(county="Santa Barbara") )
2311

24-
expect_error(
25-
aoi_get(state=NULL,x=NULL),
26-
"Requires an 'x' or 'state' parameter to execute."
27-
)
12+
expect_error( aoi_get(state=NULL,x=NULL) )
2813
})
2914

3015
test_that("aoi_get & getFiat & getClip & defineClip", {
@@ -57,9 +42,7 @@ test_that("aoi_get & getFiat & getClip & defineClip", {
5742
"No country found"
5843
)
5944

60-
expect_error(
61-
aoi_get(state="CA",county="Dallas")
62-
)
45+
expect_true(is.na(aoi_get(state="CA",county="Dallas")$state_abbr))
6346

6447
conus<- aoi_get(state="conus")
6548
expect_true(nrow(conus)==49)

0 commit comments

Comments
 (0)

[8]ページ先頭

©2009-2025 Movatter.jp