Skip to content

Commit

Permalink
Release v0.4.2
Browse files Browse the repository at this point in the history
Merge pull request #32 from riccardoporreca/develop
  • Loading branch information
riccardoporreca committed Oct 30, 2021
2 parents 451060b + b3a2ce4 commit 35add88
Show file tree
Hide file tree
Showing 3 changed files with 40 additions and 44 deletions.
76 changes: 33 additions & 43 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
@@ -1,3 +1,6 @@
# Workflow derived from https://github.com/r-lib/actions/tree/master/examples
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help

# Trigger the workflow...
on:
# ...on push or pull request
Expand All @@ -19,65 +22,52 @@ jobs:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'oldrel'}
- {os: windows-latest, r: 'oldrel-1'}
- {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"}
- {os: macOS-latest, r: 'oldrel-1'}
- {os: macOS-latest, r: 'release'}
- {os: macOS-latest, r: 'devel'}
- {os: ubuntu-latest, r: 'oldrel-1'}
- {os: ubuntu-latest, r: 'release'}
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}

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

steps:
- uses: actions/checkout@v2

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

- uses: r-lib/actions/setup-r@v1
# this gets often stuck (esp. on macOS) for the default 6h timeout
timeout-minutes: 5
with:
r-version: ${{ matrix.config.r }}
http-user-agent: ${{ matrix.config.http-user-agent }}
use-public-rspm: true

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

- name: Query dependencies
- name: Ensure symlinks to the installed R and Rscript on macOS
# work around https://github.com/r-lib/actions/issues/412
if: runner.os == 'macOS'
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}
sudo ln -sf $R_HOME/bin/R /usr/local/bin
sudo ln -sf $R_HOME/bin/Rscript /usr/local/bin
env:
R_HOME: /Library/Frameworks/R.framework/Resources

- name: Restore R package cache
uses: actions/cache@v2
- uses: r-lib/actions/setup-r-dependencies@v1
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-
extra-packages: rcmdcheck

- 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}
- uses: r-lib/actions/check-r-package@v1

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

- name: Upload check results
if: failure()
Expand All @@ -89,15 +79,15 @@ jobs:
- name: Test coverage
if: success() && runner.os == 'Linux' && matrix.config.r == 'release'
run: |
remotes::install_cran("covr")
pak::pkg_install("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")'
Rscript -e 'pak::pkg_install("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)'
Expand Down
2 changes: 1 addition & 1 deletion 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.1
Version: 0.4.2
Authors@R:
person(given = "Riccardo",
family = "Porreca",
Expand Down
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.2

## CI maintenance

- Continuous Integration maintenance, based on simplified GitHub Actions workflows with special handling for macOS (#31).

# rmdgallery 0.4.1

## CI maintenance
Expand Down

0 comments on commit 35add88

Please sign in to comment.