Skip to content

Commit 6a221d4

Browse files
authored
Merge pull request #80 from KWB-R/dev
Release v0.1.6
2 parents 494cd02 + 42b779c commit 6a221d4

32 files changed

Lines changed: 843 additions & 232 deletions

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -13,3 +13,4 @@
1313
secrets.csv
1414
^R\\.add_author.R$
1515
^\.travis\.yml$
16+
^\.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: 81 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,81 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- main
6+
- dev
7+
pull_request:
8+
branches:
9+
- master
10+
- main
11+
- dev
12+
13+
name: R-CMD-check
14+
15+
jobs:
16+
R-CMD-check:
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: macOS-latest, r: 'release'}
26+
- {os: ubuntu-20.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/focal/latest"}
27+
- {os: windows-latest, r: 'devel'}
28+
- {os: windows-latest, r: 'oldrel'}
29+
- {os: windows-latest, r: 'release'}
30+
31+
env:
32+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
33+
RSPM: ${{ matrix.config.rspm }}
34+
35+
steps:
36+
- uses: actions/checkout@v2
37+
38+
- uses: r-lib/actions/setup-r@master
39+
with:
40+
r-version: ${{ matrix.config.r }}
41+
42+
- uses: r-lib/actions/setup-pandoc@master
43+
44+
- name: Query dependencies
45+
run: |
46+
install.packages('remotes')
47+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
48+
shell: Rscript {0}
49+
50+
- name: Cache R packages
51+
if: runner.os != 'Windows'
52+
uses: actions/cache@v1
53+
with:
54+
path: ${{ env.R_LIBS_USER }}
55+
key: ${{ runner.os }}-r-${{ matrix.config.r }}-3-${{ hashFiles('depends.Rds') }}
56+
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-3-
57+
58+
- name: Install system dependencies
59+
if: runner.os == 'Linux'
60+
env:
61+
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
62+
run: |
63+
Rscript -e "remotes::install_github('r-hub/sysreqs')"
64+
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
65+
sudo -s eval "$sysreqs"
66+
- name: Install dependencies
67+
run: |
68+
remotes::install_deps(dependencies = TRUE)
69+
remotes::install_cran("rcmdcheck")
70+
shell: Rscript {0}
71+
72+
- name: Check
73+
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
74+
shell: Rscript {0}
75+
76+
- name: Upload check results
77+
if: failure()
78+
uses: actions/upload-artifact@master
79+
with:
80+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
81+
path: check

.github/workflows/pkgdown.yaml

Lines changed: 49 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,49 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- master
6+
- dev
7+
8+
name: pkgdown
9+
10+
jobs:
11+
pkgdown:
12+
runs-on: macOS-latest
13+
env:
14+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
15+
steps:
16+
- uses: actions/checkout@v2
17+
18+
- uses: r-lib/actions/setup-r@master
19+
20+
- uses: r-lib/actions/setup-pandoc@master
21+
22+
- name: Query dependencies
23+
run: |
24+
install.packages('remotes')
25+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
26+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
27+
shell: Rscript {0}
28+
29+
- name: Cache R packages
30+
uses: actions/cache@v2
31+
with:
32+
path: ${{ env.R_LIBS_USER }}
33+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
34+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
35+
36+
- name: Install dependencies
37+
run: |
38+
remotes::install_deps(dependencies = TRUE)
39+
install.packages("pkgdown", type = "binary")
40+
shell: Rscript {0}
41+
42+
- name: Install package
43+
run: R CMD INSTALL .
44+
45+
- name: Deploy package
46+
run: |
47+
git config --local user.email "actions@github.com"
48+
git config --local user.name "GitHub Actions"
49+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

.github/workflows/pr-commands.yaml

Lines changed: 51 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,51 @@
1+
on:
2+
issue_comment:
3+
types: [created]
4+
name: Commands
5+
jobs:
6+
document:
7+
if: startsWith(github.event.comment.body, '/document')
8+
name: document
9+
runs-on: macOS-latest
10+
env:
11+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
12+
steps:
13+
- uses: actions/checkout@v2
14+
- uses: r-lib/actions/pr-fetch@master
15+
with:
16+
repo-token: ${{ secrets.GITHUB_TOKEN }}
17+
- uses: r-lib/actions/setup-r@master
18+
- name: Install dependencies
19+
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
20+
- name: Document
21+
run: Rscript -e 'roxygen2::roxygenise()'
22+
- name: commit
23+
run: |
24+
git add man/\* NAMESPACE
25+
git commit -m 'Document'
26+
- uses: r-lib/actions/pr-push@master
27+
with:
28+
repo-token: ${{ secrets.GITHUB_TOKEN }}
29+
style:
30+
if: startsWith(github.event.comment.body, '/style')
31+
name: style
32+
runs-on: macOS-latest
33+
env:
34+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
35+
steps:
36+
- uses: actions/checkout@v2
37+
- uses: r-lib/actions/pr-fetch@master
38+
with:
39+
repo-token: ${{ secrets.GITHUB_TOKEN }}
40+
- uses: r-lib/actions/setup-r@master
41+
- name: Install dependencies
42+
run: Rscript -e 'install.packages("styler")'
43+
- name: Style
44+
run: Rscript -e 'styler::style_pkg()'
45+
- name: commit
46+
run: |
47+
git add \*.R
48+
git commit -m 'Style'
49+
- uses: r-lib/actions/pr-push@master
50+
with:
51+
repo-token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
- main
6+
pull_request:
7+
branches:
8+
- master
9+
- main
10+
11+
name: test-coverage
12+
13+
jobs:
14+
test-coverage:
15+
runs-on: macOS-latest
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- uses: r-lib/actions/setup-r@master
22+
23+
- uses: r-lib/actions/setup-pandoc@master
24+
25+
- name: Query dependencies
26+
run: |
27+
install.packages('remotes')
28+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
29+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
30+
shell: Rscript {0}
31+
32+
- name: Cache R packages
33+
uses: actions/cache@v1
34+
with:
35+
path: ${{ env.R_LIBS_USER }}
36+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
37+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
38+
39+
- name: Install dependencies
40+
run: |
41+
install.packages(c("remotes"))
42+
remotes::install_deps(dependencies = TRUE)
43+
remotes::install_cran("covr")
44+
shell: Rscript {0}
45+
46+
- name: Test coverage
47+
run: covr::codecov()
48+
shell: Rscript {0}

.travis.yml

Lines changed: 0 additions & 44 deletions
This file was deleted.

DESCRIPTION

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -1,6 +1,6 @@
11
Package: kwb.pkgbuild
22
Title: R package for standardised development at KWB
3-
Version: 0.1.5
3+
Version: 0.1.6
44
Authors@R:
55
c(person(given = "Michael",
66
family = "Rustler",
@@ -53,4 +53,4 @@ Remotes:
5353
ByteCompile: true
5454
Encoding: UTF-8
5555
LazyData: true
56-
RoxygenNote: 7.1.0
56+
RoxygenNote: 7.1.1

NAMESPACE

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@ export(copy_files_from_vignettes_dir_to_deploy_dir)
55
export(create_empty_branch)
66
export(create_empty_branch_ghpages)
77
export(create_pkg_dir)
8-
export(deploy_local_with_extra_files)
98
export(deploy_site_github_with_extra_files)
9+
export(deploy_to_branch_with_extra_files)
1010
export(get_pkgname)
1111
export(git_check_config)
1212
export(git_setup_user)
@@ -16,10 +16,12 @@ export(use_autopkgdown)
1616
export(use_badge_appveyor)
1717
export(use_badge_codecov)
1818
export(use_badge_cran)
19+
export(use_badge_ghactions)
1920
export(use_badge_lifecycle)
2021
export(use_badge_travis)
2122
export(use_codecov)
2223
export(use_description)
24+
export(use_ghactions)
2325
export(use_gitlab_ci_blogdown)
2426
export(use_gitlab_ci_docs)
2527
export(use_gitlab_ci_ghpages)
@@ -55,7 +57,6 @@ importFrom(kwb.utils,defaultIfNULL)
5557
importFrom(kwb.utils,selectElements)
5658
importFrom(magrittr,"%>%")
5759
importFrom(openssl,base64_decode)
58-
importFrom(pkgdown,as_pkgdown)
5960
importFrom(pkgdown,build_site)
6061
importFrom(processx,run)
6162
importFrom(rematch2,re_match)

NEWS.md

Lines changed: 7 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
# [kwb.pkgbuild 0.1.6](https://github.com/KWB-R/kwb.pkgbuild/releases/tag/v0.1.6) <small>2020-11-24</small>
2+
3+
* Add function `deploy_to_branch_with_extra_files()` for using github-actions to
4+
deploy to gh-pages (#73)
5+
6+
* Use GitHub Actions as default CI (#78) and removed support for Travis and Appveyor
7+
18
# [kwb.pkgbuild 0.1.5](https://github.com/KWB-R/kwb.pkgbuild/releases/tag/v0.1.5) <small>2020-10-09</small>
29

310
* Update default GitHub branch to `main` since 2020-10-01 (see: [Article](https://www.zdnet.com/article/github-to-replace-master-with-main-starting-next-month/))

0 commit comments

Comments
 (0)