Skip to content

Commit

Permalink
Merge pull request #104 from inbo/0.3.1
Browse files Browse the repository at this point in the history
Add Zenodo support for bookdown
  • Loading branch information
ThierryO authored May 7, 2023
2 parents d3c2691 + 187d9b2 commit a475267
Show file tree
Hide file tree
Showing 69 changed files with 1,077 additions and 281 deletions.
4 changes: 2 additions & 2 deletions .github/workflows/check_on_branch.yml
Original file line number Diff line number Diff line change
@@ -1,7 +1,6 @@
on:
push:
branches-ignore:
- master
- main
- ghpages

Expand All @@ -14,7 +13,8 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZENODO_SANDBOX: ${{ secrets.ZENODO_SANDBOX }}
permissions:
contents: read
steps:
- uses: inbo/actions/[email protected].0
- uses: inbo/actions/[email protected].2
94 changes: 30 additions & 64 deletions .github/workflows/check_on_different_r_os.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,86 +22,52 @@ jobs:
fail-fast: false
matrix:
config:
- {os: macOS-latest, r: 'release'}
- {os: windows-latest, r: 'release'}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: macOS-latest, r: 'release', skip_test: 'false'}
- {os: windows-latest, r: 'release', skip_test: 'true'}
- {os: ubuntu-22.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest", skip_test: 'false'}
- {os: ubuntu-22.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/jammy/latest", skip_test: 'false'}

env:
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
_R_CHECK_SYSTEM_CLOCK_: false
RSPM: ${{ matrix.config.rspm }}
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
ZENODO_SANDBOX: ${{ secrets.ZENODO_SANDBOX }}

steps:
- uses: actions/checkout@v3

- uses: r-lib/actions/setup-r@v2
with:
r-version: ${{ matrix.config.r }}
extra-repositories: https://inbo.r-universe.dev

- uses: r-lib/actions/setup-pandoc@v2

- name: Query dependencies
- name: linux dependencies
if: runner.os == 'linux'
run: |
install.packages('remotes')
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
shell: Rscript {0}

- name: Cache R packages
if: runner.os != 'Windows'
uses: actions/cache@v3
sudo apt update
sudo apt install -y --no-install-recommends libcurl4-openssl-dev \
libfontconfig1-dev libfreetype6-dev libfribidi-dev libharfbuzz-dev \
libjpeg-dev libmagick++-dev libpng-dev libpoppler-cpp-dev \
libsecret-1-dev libtiff5-dev
sudo apt install -y --no-install-recommends r-cran-assertthat \
r-cran-bookdown r-cran-covr r-cran-curl r-cran-desc \
r-cran-devtools r-cran-fs r-cran-gert r-cran-httr r-cran-hunspell \
r-cran-jsonlite r-cran-knitr r-cran-mockery r-cran-pdftools \
r-cran-r6 r-cran-rcmdcheck r-cran-remotes r-cran-rmarkdown \
r-cran-roxygen2 r-cran-rstudioapi r-cran-sessioninfo \
r-cran-testthat r-cran-withr r-cran-yaml
Rscript --no-save --no-restore -e 'install.packages("remotes")'
Rscript --no-save --no-restore -e 'remotes::install_cran(c("assertthat", "bookdown", "codemetar", "covr", "curl", "desc", "devtools", "fs", "gert", "hexSticker", "httr", "hunspell", "jsonlite", "knitr", "lintr", "mockery", "pdftools", "pkgdown", "R6", "rcmdcheck", "renv", "rmarkdown", "roxygen2", "rstudioapi", "sessioninfo", "showtext", "sysfonts", "testthat", "withr", "yaml"))'
- uses: r-lib/actions/setup-r-dependencies@v2
if: runner.os != 'linux'

- uses: r-lib/actions/check-r-package@v2
with:
path: ${{ env.R_LIBS_USER }}
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-

- name: Install macOS system dependencies
if: runner.os == 'macOS'
run: |
brew install fribidi
- name: Install linux system dependencies
if: runner.os == 'Linux'
env:
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
run: |
Rscript -e "remotes::install_github('r-hub/sysreqs')"
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
sudo -s eval "$sysreqs"
sudo apt-get install -y libcurl4-openssl-dev
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE,
type = ifelse(.Platform$OS.type=="unix", "source", "binary"))
remotes::install_cran("rcmdcheck")
install.packages("stringi")
shell: Rscript {0}

- name: Session info
run: |
options(width = 100)
pkgs <- installed.packages()[, "Package"]
sessioninfo::session_info(pkgs, include_base = TRUE)
shell: Rscript {0}

- name: Check
error-on: '"error"'
env:
_R_CHECK_CRAN_INCOMING_: true
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "error", check_dir = "check")
shell: Rscript {0}

- name: Show testthat output
if: always()
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
shell: bash

- name: Upload check results
if: failure()
uses: actions/upload-artifact@master
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check
retention-days: 5
ZENODO_SANDBOX: ${{ secrets.ZENODO_SANDBOX }}
SKIP_TEST: ${{ matrix.config.skip_test }}
3 changes: 2 additions & 1 deletion .github/workflows/check_on_main.yml
Original file line number Diff line number Diff line change
Expand Up @@ -17,5 +17,6 @@ jobs:
env:
CODECOV_TOKEN: ${{ secrets.CODECOV_TOKEN }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
ZENODO_SANDBOX: ${{ secrets.ZENODO_SANDBOX }}
steps:
- uses: inbo/actions/[email protected].0
- uses: inbo/actions/[email protected].2
6 changes: 5 additions & 1 deletion .github/workflows/release.yml
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,11 @@ name: Releases
on:
push:
tags:
- 'v*'
- v*
workflow_run:
workflows: ["check package on main"]
types:
- completed

jobs:

Expand Down
4 changes: 2 additions & 2 deletions .zenodo.json
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
{
"title": "checklist: A Thorough and Strict Set of Checks for R Packages and Source Code",
"version": "0.3.1",
"version": "0.3.2",
"license": "GPL-3.0",
"upload_type": "software",
"description": "<p>An opinionated set of rules for R packages and R source code\nprojects.<\/p>",
Expand All @@ -9,6 +9,7 @@
"documentation",
"publication"
],
"access_right": "open",
"language": "eng",
"contributors": [
{
Expand Down Expand Up @@ -41,7 +42,6 @@
"orcid": "0000-0001-8804-4216"
}
],
"access_right": "open",
"communities": [
{
"identifier": "inbo"
Expand Down
2 changes: 1 addition & 1 deletion CITATION.cff
Original file line number Diff line number Diff line change
Expand Up @@ -25,4 +25,4 @@ identifiers:
value: 10.5281/zenodo.4028303
- type: url
value: https://inbo.github.io/checklist/
version: 0.3.1
version: 0.3.2
11 changes: 7 additions & 4 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,7 +1,7 @@
Type: Package
Package: checklist
Title: A Thorough and Strict Set of Checks for R Packages and Source Code
Version: 0.3.1
Version: 0.3.2
Authors@R: c(
person("Thierry", "Onkelinx", , "[email protected]", role = c("aut", "cre"),
comment = c(ORCID = "0000-0001-8804-4216", affiliation = "Research Institute for Nature and Forest (INBO)")),
Expand Down Expand Up @@ -30,8 +30,8 @@ Imports:
hunspell,
jsonlite,
knitr,
lintr (>= 2.0.1.9000),
pkgdown,
lintr (>= 3.0.2.9000),
pkgdown (>= 2.0.7),
R6,
rcmdcheck,
renv,
Expand All @@ -41,16 +41,19 @@ Imports:
withr,
yaml
Suggests:
bookdown,
covr,
curl,
mockery,
roxygen2,
rstudioapi,
showtext,
sysfonts,
testthat
testthat,
zen4R (>= 0.9)
VignetteBuilder:
knitr
Additional_repositories: https://inbo.r-universe.dev
Config/checklist/communities: inbo
Config/checklist/keywords: quality control; documentation; publication
Encoding: UTF-8
Expand Down
Loading

0 comments on commit a475267

Please sign in to comment.