Skip to content

Commit f7e94d0

Browse files
committed
Add GitHub Action for R CMD check. Update README.
1 parent 25609bb commit f7e94d0

File tree

5 files changed

+85
-11
lines changed

5 files changed

+85
-11
lines changed

.Rbuildignore

Lines changed: 2 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,5 @@
11
^.*\.Rproj$
22
^\.Rproj\.user$
33
README.Rmd
4-
README.md
4+
README.md
5+
^\.github$

.github/.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

.github/workflows/R-CMD-check.yaml

Lines changed: 52 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,52 @@
1+
# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples
2+
# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help
3+
on:
4+
push:
5+
branches: [main]
6+
pull_request:
7+
branches: [main]
8+
9+
name: R-CMD-check.yaml
10+
11+
permissions: read-all
12+
13+
jobs:
14+
R-CMD-check:
15+
runs-on: ${{ matrix.config.os }}
16+
17+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
18+
19+
strategy:
20+
fail-fast: false
21+
matrix:
22+
config:
23+
- {os: macos-latest, r: 'release'}
24+
- {os: windows-latest, r: 'release'}
25+
- {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'}
26+
- {os: ubuntu-latest, r: 'release'}
27+
- {os: ubuntu-latest, r: 'oldrel-1'}
28+
29+
env:
30+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
31+
R_KEEP_PKG_SOURCE: yes
32+
33+
steps:
34+
- uses: actions/checkout@v4
35+
36+
- uses: r-lib/actions/setup-pandoc@v2
37+
38+
- uses: r-lib/actions/setup-r@v2
39+
with:
40+
r-version: ${{ matrix.config.r }}
41+
http-user-agent: ${{ matrix.config.http-user-agent }}
42+
use-public-rspm: true
43+
44+
- uses: r-lib/actions/setup-r-dependencies@v2
45+
with:
46+
extra-packages: any::rcmdcheck
47+
needs: check
48+
49+
- uses: r-lib/actions/check-r-package@v2
50+
with:
51+
upload-snapshots: true
52+
build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")'

README.Rmd

Lines changed: 11 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -12,12 +12,14 @@ knitr::opts_chunk$set(
1212
)
1313
```
1414

15-
# akrreport <a href=""><img src="./README-images/logo.png" align="right" height="138" /></a>
16-
1715
<!-- badges: start -->
1816
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
17+
[![R-CMD-check](https://github.com/USFWS/akrreport/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/USFWS/akrreport/actions/workflows/R-CMD-check.yaml)
1918
<!-- badges: end -->
2019

20+
akrreport <a href=""><img src="./README-images/logo.png" align="right" height="138" /></a>
21+
================================
22+
2123
## Overview
2224

2325
This R package provides R Markdown and Quarto templates for reports generated by biologists at National Wildlife Refuges in Alaska, including the Alaska Refuge Report Series.
@@ -55,4 +57,10 @@ Contact the [project maintainer](emailto:[email protected]) for help with this
5557

5658
## Contribute
5759

58-
Contact the [project maintainer](emailto:[email protected]) for information about contributing to this repository template. Submit a [GitHub Issue](https://github.com/USFWS/r7-repo-template/issues) to report a bug or request a feature or enhancement.
60+
Contact the [project maintainer](emailto:[email protected]) for information about contributing to this repository template. Submit a [GitHub Issue](https://github.com/USFWS/r7-repo-template/issues) to report a bug or request a feature or enhancement.
61+
62+
-----
63+
64+
![](https://i.creativecommons.org/l/by/4.0/88x31.png) This work is
65+
licensed under a [Creative Commons Attribution 1.0 International
66+
License](https://creativecommons.org/licenses/by/1.0/).

README.md

Lines changed: 19 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -1,14 +1,14 @@
11

22
<!-- README.md is generated from README.Rmd. Please edit that file -->
3-
4-
# akrreport <a href=""><img src="./README-images/logo.png" align="right" height="138" /></a>
5-
63
<!-- badges: start -->
74

85
[![Lifecycle:
96
experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://lifecycle.r-lib.org/articles/stages.html#experimental)
7+
[![R-CMD-check](https://github.com/USFWS/akrreport/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/USFWS/akrreport/actions/workflows/R-CMD-check.yaml)
108
<!-- badges: end -->
119

10+
# akrreport <a href=""><img src="./README-images/logo.png" align="right" height="138" /></a>
11+
1212
## Overview
1313

1414
This R package provides R Markdown and Quarto templates for reports
@@ -34,15 +34,21 @@ you’ll need:
3434

3535
## Usage
3636

37-
The package reprository is currently set to Internal access. To install the template,
38-
you will need to download the package as a tar.gz file [here](https://github.com/USFWS/akrreport/tags)
39-
and then install from this file.
37+
Install the template directly:
38+
39+
``` r
40+
if (!requireNamespace("devtools")) install.packages("devtools")
41+
devtools::install_github("usfws/akrreport")
42+
```
4043

4144
This will install the package `akrreport`. Once installed, templates
4245
will be available within the R Markdown and Quarto templates as shown
4346
below:
4447

45-
![Alaska Refuge Report](./README-images/templates.png)
48+
<figure>
49+
<img src="./README-images/templates.png" alt="Alaska Refuge Report" />
50+
<figcaption aria-hidden="true">Alaska Refuge Report</figcaption>
51+
</figure>
4652

4753
## Getting help
4854

@@ -55,3 +61,9 @@ Contact the [project maintainer](emailto:[email protected]) for
5561
information about contributing to this repository template. Submit a
5662
[GitHub Issue](https://github.com/USFWS/r7-repo-template/issues) to
5763
report a bug or request a feature or enhancement.
64+
65+
------------------------------------------------------------------------
66+
67+
![](https://i.creativecommons.org/l/by/4.0/88x31.png) This work is
68+
licensed under a [Creative Commons Attribution 1.0 International
69+
License](https://creativecommons.org/licenses/by/1.0/).

0 commit comments

Comments
 (0)