Skip to content

Commit 580bfae

Browse files
authored
Merge pull request #12 from lsteinmann/packagedoc
documentation and CI test #2
2 parents 624094f + 29c7b9f commit 580bfae

6 files changed

Lines changed: 146 additions & 72 deletions

File tree

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

Lines changed: 64 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,25 +1,84 @@
1+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
2+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
13
on:
24
push:
35
branches:
6+
- main
47
- master
5-
- inscrbithynia
68
pull_request:
79
branches:
10+
- main
811
- master
912

1013
name: R-CMD-check
1114

1215
jobs:
1316
R-CMD-check:
14-
runs-on: macOS-latest
17+
runs-on: ${{ matrix.config.os }}
18+
19+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
20+
21+
strategy:
22+
fail-fast: false
23+
matrix:
24+
config:
25+
- {os: windows-latest, r: 'release'}
26+
- {os: macOS-latest, r: 'release'}
27+
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
28+
- {os: ubuntu-20.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
29+
30+
env:
31+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
32+
RSPM: ${{ matrix.config.rspm }}
33+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
34+
1535
steps:
1636
- uses: actions/checkout@v2
17-
- uses: r-lib/actions/setup-r@master
37+
38+
- uses: r-lib/actions/setup-r@v1
39+
with:
40+
r-version: ${{ matrix.config.r }}
41+
42+
- uses: r-lib/actions/setup-pandoc@v1
43+
44+
- name: Query dependencies
45+
run: |
46+
install.packages('remotes')
47+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
48+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
49+
shell: Rscript {0}
50+
51+
- name: Cache R packages
52+
if: runner.os != 'Windows'
53+
uses: actions/cache@v2
54+
with:
55+
path: ${{ env.R_LIBS_USER }}
56+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
57+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
58+
59+
- name: Install system dependencies
60+
if: runner.os == 'Linux'
61+
run: |
62+
while read -r cmd
63+
do
64+
eval sudo $cmd
65+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "20.04"))')
66+
1867
- name: Install dependencies
1968
run: |
20-
install.packages(c("remotes", "rcmdcheck"))
2169
remotes::install_deps(dependencies = TRUE)
70+
remotes::install_cran("rcmdcheck")
2271
shell: Rscript {0}
72+
2373
- name: Check
24-
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error")
74+
env:
75+
_R_CHECK_CRAN_INCOMING_REMOTE_: false
76+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
2577
shell: Rscript {0}
78+
79+
- name: Upload check results
80+
if: failure()
81+
uses: actions/upload-artifact@main
82+
with:
83+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
84+
path: check

.travis.yml

Lines changed: 9 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -1,10 +1,14 @@
11
# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r
22

33
language: R
4-
cache: packages
54

5+
cache: packages
6+
latex: false
67

7-
addons:
8-
apt:
9-
packages:
10-
- libgit2-dev
8+
matrix:
9+
include:
10+
- r: 3.3
11+
- r: release
12+
- os: osx
13+
osx_image: xcode7.3
14+
disable_homebrew: true

DESCRIPTION

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,7 @@
11
Package: datplot
22
Type: Package
33
Title: Preparation of object dating ranges for density plots
4-
Version: 0.2.3
4+
Version: 0.2.4
55
Author: Lisa Steinmann
66
Maintainer: Lisa Steinmann <lisa.steinmann@rub.de>
77
Description: Converting date ranges into dating 'steps' eases the visualization of changes in e.g. pottery consumption, style and other variables over time. This package provides tools to process and prepare data for visualization.

datplot.Rproj

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -18,4 +18,5 @@ StripTrailingWhitespace: Yes
1818
BuildType: Package
1919
PackageUseDevtools: Yes
2020
PackageInstallArgs: --no-multiarch --with-keep.source
21+
PackageCheckArgs: --as-cran
2122
PackageRoxygenize: rd,collate,namespace

0 commit comments

Comments
 (0)