Skip to content

Commit

Permalink
Merge branch 'release/v1.0.4'
Browse files Browse the repository at this point in the history
  • Loading branch information
howardjp committed Jul 11, 2021
2 parents 70bd68d + 21b7d13 commit 14d817c
Show file tree
Hide file tree
Showing 6 changed files with 175 additions and 7 deletions.
67 changes: 67 additions & 0 deletions .github/workflows/check-release.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,67 @@
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
on:
schedule:
- cron: '0 1 * * *'
push:
branches:
- main
- master
- develop
pull_request:
branches:
- main
- master
- develop

name: Build

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

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

strategy:
fail-fast: false
matrix:
config:
- {os: windows-latest, r: 'release'}
- {os: macOS-latest, r: 'release'}

env:
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: Install dependencies
run: |
install.packages(c("remotes", "rcmdcheck", "usethis"))
remotes::install_deps(dependencies = TRUE)
shell: Rscript {0}

- name: Check
env:
_R_CHECK_FORCE_SUGGESTS_: false
_R_CHECK_CRAN_INCOMING_REMOTE_: false
run: |
devtools::document()
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


51 changes: 51 additions & 0 deletions .github/workflows/lint.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,51 @@
on:
push:
branches:
- main
- master
- develop
pull_request:
branches:
- main
- master
- develop

name: lint

jobs:
lint:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

- uses: r-lib/actions/setup-r@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 dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("lintr")
shell: Rscript {0}

- name: Install package
run: R CMD INSTALL .

- name: Lint
run: lintr::lint_package()
shell: Rscript {0}
2 changes: 1 addition & 1 deletion .github/workflows/pkgdown.yaml
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
on:
push:
branches: master
branches: main

name: pkgdown

Expand Down
50 changes: 50 additions & 0 deletions .github/workflows/test-coverage.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,50 @@
on:
push:
branches:
- main
- master
- develop
pull_request:
branches:
- main
- master
- develop

name: test-coverage

jobs:
test-coverage:
runs-on: macOS-latest
env:
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
steps:
- uses: actions/checkout@v2

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

- 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 dependencies
run: |
install.packages(c("remotes"))
remotes::install_deps(dependencies = TRUE)
remotes::install_cran("covr")
shell: Rscript {0}

- name: Test coverage
run: covr::codecov()
shell: Rscript {0}
5 changes: 2 additions & 3 deletions DESCRIPTION
Original file line number Diff line number Diff line change
@@ -1,8 +1,8 @@
Package: cmna
Type: Package
Title: Computational Methods for Numerical Analysis
Version: 1.0.3
Date: 2020-07-05
Version: 1.0.4
Date: 2021-07-11
Encoding: UTF-8
Authors@R: person(given = "James", family = "Howard",
email = "[email protected]", role = c("aut", "cre"),
Expand All @@ -14,7 +14,6 @@ Description: Provides the source and examples for James P. Howard, II,
<https://jameshoward.us/cmna>, a book on numerical
methods in R.
License: BSD_2_clause + file LICENSE
LazyLoad: no
Suggests:
testthat,
devtools,
Expand Down
7 changes: 4 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
@@ -1,9 +1,10 @@
# Computational Methods for Numerical Analysis

[![Build Status](https://travis-ci.org/k3jph/cmna-pkg.svg?branch=master)](https://travis-ci.org/k3jph/cmna-pkg)
[![Coverage Status](https://coveralls.io/repos/github/k3jph/cmna-pkg/badge.svg?branch=develop)](https://coveralls.io/github/k3jph/cmna-pkg?branch=develop)
[![codecov](https://codecov.io/gh/k3jph/cmna-pkg/branch/master/graph/badge.svg)](https://codecov.io/gh/k3jph/cmna-pkg)
![CRAN/METACRAN](https://img.shields.io/cran/v/cmna)
[![Downloads from the RStudio CRAN mirror](https://cranlogs.r-pkg.org/badges/cmna)](https://cran.r-project.org/package=cmna)
[![Build Status](https://github.com/k3jph/cmna-pkg/actions/workflows/check-release.yaml/badge.svg?branch=main)](https://github.com/k3jph/cmna-pkg/actions/workflows/check-release.yaml)
[![codecov](https://codecov.io/gh/k3jph/cmna-pkg/branch/master/graph/badge.svg)](https://codecov.io/gh/k3jph/cmna-pkg)
[![Codacy Badge](https://app.codacy.com/project/badge/Grade/75dad26c84804291ab359fc32e67f635)](https://www.codacy.com/gh/k3jph/cmna-pkg/dashboard?utm_source=github.com&amp;utm_medium=referral&amp;utm_content=k3jph/cmna-pkg&amp;utm_campaign=Badge_Grade)
[![Package DOI](https://img.shields.io/badge/Package_DOI-10.5281%2Fzenodo.3249230-blue.svg)](https://doi.org/10.5281/zenodo.3249230)
[![Book DOI](https://img.shields.io/badge/Book_DOI-10.1201%2F9781315120195-blue.svg)](https://doi.org/10.1201/9781315120195)

Expand Down

0 comments on commit 14d817c

Please sign in to comment.