Skip to content

Commit

Permalink
Release v0.4.1
Browse files Browse the repository at this point in the history
Merge pull request #30 from riccardoporreca/develop
  • Loading branch information
riccardoporreca committed Jul 1, 2021
2 parents 4426577 + ae3cc63 commit 451060b
Show file tree
Hide file tree
Showing 12 changed files with 131 additions and 65 deletions.
1 change: 0 additions & 1 deletion .Rbuildignore
Original file line number Diff line number Diff line change
Expand Up @@ -5,6 +5,5 @@
^_pkgdown\.yml$
^docs$
^pkgdown$
^\.travis\.yml$
^codecov\.yml$
^\.covrignore$
10 changes: 10 additions & 0 deletions .github/dependabot.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,10 @@

version: 2

updates:

# Maintain dependencies for GitHub Actions
- package-ecosystem: "github-actions"
directory: "/"
schedule:
interval: "daily"
36 changes: 0 additions & 36 deletions .github/workflows/R-CMD-check.yaml

This file was deleted.

104 changes: 104 additions & 0 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,104 @@
# Trigger the workflow...
on:
# ...on push or pull request
push:
pull_request:
# ...on a weekly basis at 00:00 UTC on Saturday
schedule:
- cron: '0 0 * * 6'

name: CI

jobs:
CI:
runs-on: ${{ matrix.config.os }}

name: ${{ matrix.config.os }} (${{ matrix.config.r }})

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'oldrel'}
- {os: windows-latest, r: 'release'}
- {os: windows-latest, r: 'devel'}
- {os: macOS-latest, r: 'oldrel'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-latest, r: 'devel'}
- {os: ubuntu-20.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}

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

steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@v1
with:
r-version: ${{ matrix.config.r }}

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

- name: Query dependencies
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: Restore R package cache
uses: actions/cache@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 system dependencies
if: runner.os == 'Linux'
run: |
while read -r cmd
do
eval sudo $cmd
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
- name: Install dependencies
run: |
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("rcmdcheck")
shell: Rscript {0}

- name: Check
env:
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
options(crayon.enabled = TRUE)
rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
shell: Rscript {0}

- name: Upload check results
if: failure()
uses: actions/upload-artifact@main
with:
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
path: check

- name: Test coverage
if: success() && runner.os == 'Linux' && matrix.config.r == 'release'
run: |
remotes::install_cran("covr")
covr::codecov()
shell: Rscript {0}

- name: Build and deploy pkgdown website
if: success() && github.ref == 'refs/heads/main' && runner.os == 'Linux' && matrix.config.r == 'release'
run: |
R CMD INSTALL .
Rscript -e 'install.packages("pkgdown")'
git config --local user.email "actions@github.com"
git config --local user.name "GitHub Actions"
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'
17 changes: 0 additions & 17 deletions .travis.yml

This file was deleted.

4 changes: 2 additions & 2 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
Package: rmdgallery
Title: R Markdown Website Gallery Generator
Version: 0.4.0
Version: 0.4.1
Authors@R:
person(given = "Riccardo",
family = "Porreca",
Expand All @@ -26,4 +26,4 @@ Suggests:
testthat (>= 2.1.0),
covr
Roxygen: list(markdown = TRUE)
RoxygenNote: 7.1.0
RoxygenNote: 7.1.1
6 changes: 6 additions & 0 deletions NEWS.md
Original file line number Diff line number Diff line change
@@ -1,3 +1,9 @@
# rmdgallery 0.4.1

## CI maintenance

- Continuous Integration maintenance, based on GitHub Actions only, now including code coverage and `pkgdown`, formerly done via Travis CI (#28).

# rmdgallery 0.4.0

## New features
Expand Down
5 changes: 2 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,8 @@
# rmdgallery

<!-- badges: start -->
[![R build status](https://github.com/riccardoporreca/rmdgallery/workflows/R-CMD-check/badge.svg)](https://github.com/riccardoporreca/rmdgallery/actions)
[![Travis build status](https://travis-ci.com/riccardoporreca/rmdgallery.svg?branch=master)](https://travis-ci.com/riccardoporreca/rmdgallery)
[![Codecov test coverage](https://codecov.io/gh/riccardoporreca/rmdgallery/branch/master/graph/badge.svg)](https://codecov.io/gh/riccardoporreca/rmdgallery?branch=master)
[![CI](https://github.com/riccardoporreca/rmdgallery/actions/workflows/ci.yaml/badge.svg)](https://github.com/riccardoporreca/rmdgallery/actions/workflows/ci.yaml)
[![Codecov test coverage](https://codecov.io/gh/riccardoporreca/rmdgallery/branch/main/graph/badge.svg)](https://codecov.io/gh/riccardoporreca/rmdgallery?branch=main)
<!-- badges: end -->

The goal of **rmdgallery** is to provide an R Markdown [site generator](https://bookdown.org/yihui/rmarkdown/rmarkdown-site.html#custom-site-generators) that supports the inclusion of a gallery of (embedded) pages created in a dynamic way based on metadata in JSON or YAML format.
Expand Down
2 changes: 2 additions & 0 deletions codecov.yml
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,9 @@ coverage:
default:
target: auto
threshold: 1%
informational: true
patch:
default:
target: auto
threshold: 1%
informational: true
4 changes: 2 additions & 2 deletions man/gallery_content.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

2 changes: 1 addition & 1 deletion man/gallery_site.Rd

Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.

5 changes: 2 additions & 3 deletions tests/testthat/test-meta.R
Original file line number Diff line number Diff line change
Expand Up @@ -17,10 +17,9 @@ test_that("Metadata files with supported extensions are detected", {
meta_files <- tempfile(tmpdir = meta_dir, fileext = meta_ext)
other_files <- tempfile(tmpdir = meta_dir, fileext = c(".foo", ".bar", ""))
file.create(c(meta_files, other_files))
message(site_meta_files(meta_dir))
testthat::expect_setequal(
site_meta_files(meta_dir),
meta_files
normalizePath(site_meta_files(meta_dir)),
normalizePath(meta_files)
)
unlink(meta_dir, recursive = TRUE)
})
Expand Down

0 comments on commit 451060b

Please sign in to comment.