Skip to content

Commit

Permalink
Add cran-comments
Browse files Browse the repository at this point in the history
  • Loading branch information
owenjonesuob committed Dec 27, 2020
1 parent 8feaa26 commit 3ebacee
Show file tree
Hide file tree
Showing 5 changed files with 29 additions and 8 deletions.
1 change: 1 addition & 0 deletions .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -3,3 +3,4 @@
^LICENSE\.md$
^\.github$
^codecov\.yml$
^cran-comments\.md$
2 changes: 0 additions & 2 deletions .github/workflows/R-CMD-check.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -4,11 +4,9 @@ on:
push:
branches:
- main
- master
pull_request:
branches:
- main
- master

name: R-CMD-check

Expand Down
9 changes: 8 additions & 1 deletion README.md
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,14 @@ Read R package news files, regardless of whether or not the package is currently

## Installation

You can install the latest version from GitHub using:
You can install the released version from CRAN using:

```r
install.packages("pkgnews")
```


Alternatively, you can install the latest version from GitHub using:

```r
remotes::install_github("owenjonesuob/pkgnews")
Expand Down
13 changes: 13 additions & 0 deletions cran-comments.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,13 @@
## Test environments

* local R installation (Fedora 33), R 4.0.3
* GitHub Actions (https://github.com/owenjonesuob/pkgnews/actions)
* win-builder (via `devtools::check_win_devel()`)
* R-hub (via `devtools::check_rhub()`)


## R CMD check results

0 errors | 0 warnings | 1 note

* This is a new release.
12 changes: 7 additions & 5 deletions tests/testthat/test-news.R
Original file line number Diff line number Diff line change
Expand Up @@ -56,18 +56,20 @@ test_that("web", {
# Try a few CRAN packages
skip_if(!nzchar(Sys.which("pandoc")))

expect_equal(
tail(news("dplyr"), 1),
"download size from 2.8 MB to 0.5 MB."
expect_match(
# Drop zero-length elements with Filter(), in particular the last empty line!
tail(Filter(length, news("dplyr")), 1),
"download size from 2.8 MB to 0.5 MB.",
fixed = TRUE
)

expect_equal(
tail(news("checkLuhn"), 1),
tail(Filter(length, news("checkLuhn")), 1),
"- First release"
)

expect_equal(
tail(news("goodpractice"), 1),
tail(Filter(length, news("goodpractice")), 1),
"First public release."
)

Expand Down

0 comments on commit 3ebacee

Please sign in to comment.