Skip to content

Commit f9fd980

Browse files
authored
Switch testing deployments to use GitHub Actions (#27)
* Disable CRAN-RELEASE * Adios TravisCI * Add in github actions * I wonder if this will work... * Update the NEWS entry file... * Switch to GH Actions badge
1 parent 58c2933 commit f9fd980

File tree

9 files changed

+160
-39
lines changed

9 files changed

+160
-39
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -5,3 +5,4 @@
55
^\.travis\.yml$
66
^cran-comments\.md$
77
^codecov\.yml$
8+
^CRAN-RELEASE$

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

Lines changed: 66 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,66 @@
1+
on: [push, pull_request]
2+
3+
name: R-CMD-check
4+
5+
jobs:
6+
R-CMD-check:
7+
runs-on: ${{ matrix.config.os }}
8+
9+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
10+
11+
strategy:
12+
fail-fast: false
13+
matrix:
14+
config:
15+
- { os: windows-latest, r: 'release'}
16+
- { os: windows-latest, r: 'devel'}
17+
- { os: macOS-latest, r: 'release'}
18+
- { os: macOS-latest, r: 'devel'}
19+
- { os: ubuntu-16.04, r: '3.5', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
20+
- { os: ubuntu-16.04, r: 'release', cran: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
21+
22+
env:
23+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
24+
CRAN: ${{ matrix.config.cran }}
25+
26+
steps:
27+
- uses: actions/checkout@v1
28+
29+
- uses: r-lib/actions/setup-r@master
30+
with:
31+
r-version: ${{ matrix.config.r }}
32+
33+
- uses: r-lib/actions/setup-pandoc@master
34+
35+
- name: Cache R packages
36+
if: runner.os != 'Windows'
37+
uses: actions/cache@v1
38+
with:
39+
path: ${{ env.R_LIBS_USER }}
40+
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('DESCRIPTION') }}
41+
42+
- name: Install system dependencies
43+
if: runner.os == 'Linux'
44+
env:
45+
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
46+
run: |
47+
Rscript -e "install.packages('remotes')" -e "remotes::install_github('r-hub/sysreqs')"
48+
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
49+
sudo -s eval "$sysreqs"
50+
- name: Install dependencies
51+
run: Rscript -e "install.packages('remotes')" -e "remotes::install_deps(dependencies = TRUE)" -e "remotes::install_cran('rcmdcheck')"
52+
53+
- name: Check
54+
run: Rscript -e "rcmdcheck::rcmdcheck(args = '--no-manual', error_on = 'warning', check_dir = 'check')"
55+
56+
- name: Upload check results
57+
if: failure()
58+
uses: actions/upload-artifact@master
59+
with:
60+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
61+
path: check
62+
63+
- name: Test coverage
64+
if: matrix.config.os == 'macOS-latest' && matrix.config.r == 'release'
65+
run: |
66+
Rscript -e 'covr::codecov(token = "${{secrets.CODECOV_TOKEN}}")'

.github/workflows/pkgdown.yaml

Lines changed: 23 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,23 @@
1+
on:
2+
push:
3+
branches: master
4+
5+
name: Pkgdown
6+
7+
jobs:
8+
pkgdown:
9+
runs-on: macOS-latest
10+
steps:
11+
- uses: actions/checkout@master
12+
- uses: r-lib/actions/setup-r@master
13+
- uses: r-lib/actions/setup-pandoc@master
14+
- name: Install dependencies
15+
run: |
16+
Rscript -e 'install.packages("remotes")' \
17+
-e 'remotes::install_deps(dependencies = TRUE)' \
18+
-e 'remotes::install_github("jimhester/pkgdown@github-actions-deploy")'
19+
- name: Install package
20+
run: R CMD INSTALL .
21+
- name: Deploy package
22+
run: |
23+
Rscript -e "pkgdown:::deploy_local(new_process = FALSE, remote_url = 'https://x-access-token:${{secrets.GITHUB_TOKEN}}@github.com/${{github.repository}}.git')"

.github/workflows/pr-commands.yaml

Lines changed: 47 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,47 @@
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+
steps:
11+
- uses: actions/checkout@v1
12+
- uses: r-lib/actions/pr-fetch@master
13+
with:
14+
repo-token: ${{ secrets.GITHUB_TOKEN }}
15+
- uses: r-lib/actions/setup-r@master
16+
- name: Install dependencies
17+
run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
18+
- name: Document
19+
run: Rscript -e 'roxygen2::roxygenise()'
20+
- name: commit
21+
run: |
22+
git add man/\* NAMESPACE
23+
git commit -m 'Document'
24+
- uses: r-lib/actions/pr-push@master
25+
with:
26+
repo-token: ${{ secrets.GITHUB_TOKEN }}
27+
style:
28+
if: startsWith(github.event.comment.body, '/style')
29+
name: document
30+
runs-on: macOS-latest
31+
steps:
32+
- uses: actions/checkout@master
33+
- uses: r-lib/actions/pr-fetch@master
34+
with:
35+
repo-token: ${{ secrets.GITHUB_TOKEN }}
36+
- uses: r-lib/actions/setup-r@master
37+
- name: Install dependencies
38+
run: Rscript -e 'install.packages("styler")'
39+
- name: style
40+
run: Rscript -e 'styler::style_pkg()'
41+
- name: commit
42+
run: |
43+
git add \*.R
44+
git commit -m 'style'
45+
- uses: r-lib/actions/pr-push@master
46+
with:
47+
repo-token: ${{ secrets.GITHUB_TOKEN }}

.gitignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -3,3 +3,4 @@
33
.RData
44
.DS_Store
55
inst/doc
6+
CRAN-RELEASE

.travis.yml

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

NEWS.md

Lines changed: 19 additions & 8 deletions
Original file line numberDiff line numberDiff line change
@@ -2,23 +2,34 @@
22

33
## Features
44

5-
- Added ability to set default package actions.
65
- Allow RStudio's Viewer pane to display search results.
7-
- Note: This feature requires a patch per [issue 2252](https://github.com/rstudio/rstudio/issues/2252).
8-
9-
## Changes
10-
11-
- Default options added:
6+
- Note: This feature requires a patch per [issue 2252](https://github.com/rstudio/rstudio/issues/2252).
7+
([#21](https://github.com/r-assist/searcher/issues/21),
8+
[#22](https://github.com/r-assist/searcher/pull/22))
9+
- Added ability to set default package actions.
10+
([#7](https://github.com/r-assist/searcher/issues/7),
11+
[#20](https://github.com/r-assist/searcher/pull/20))
1212
- `searcher.launch_delay` controls how long the user remains in _R_ prior
1313
to the browser opening. Default is `0.5` seconds.
1414
- `searcher.use_rstudio_viewer` specifies whether RStudio's viewer pane should
15-
open the link instead of a web browser. Default is `FALSE` until the issue
16-
is resolved..
15+
open the link instead of a web browser. Default is `FALSE` until RStudio's
16+
[sandbox issue](https://github.com/rstudio/rstudio/issues/2252) is resolved.
1717

1818
## Fixes
1919

2020
- Fixed vignette index name.
2121

22+
## Deployment
23+
24+
- Switched from using [TravisCI](http://travis-ci.com/) to using
25+
[GitHub Actions for R](https://github.com/r-lib/actions).
26+
([#25](https://github.com/r-assist/searcher/issues/25),
27+
[#27](https://github.com/r-assist/searcher/pull/27))
28+
- Added [pkgdown](https://pkgdown.r-lib.org/) website for `searcher` available
29+
at: <https://r-assist.github.io/searcher>.
30+
([#26](https://github.com/r-assist/searcher/issues/26),
31+
[#27](https://github.com/r-assist/searcher/pull/27))
32+
2233
# searcher 0.0.4
2334

2435
## Features

README.Rmd

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -15,7 +15,7 @@ knitr::opts_chunk$set(
1515
# searcher
1616

1717
<!-- badges: start -->
18-
[![Travis-CI Build Status](https://travis-ci.org/r-assist/searcher.svg?branch=master)](https://travis-ci.org/r-assist/searcher)
18+
[![R build status](https://github.com/r-assist/searcher/workflows/R-CMD-check/badge.svg)](https://github.com/r-assist/searcher/actions)
1919
[![CRAN RStudio mirror downloads](http://cranlogs.r-pkg.org/badges/searcher)](http://www.r-pkg.org/pkg/searcher)
2020
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/searcher)](https://cran.r-project.org/package=searcher)
2121
[![Codecov test coverage](https://codecov.io/gh/r-assist/searcher/branch/master/graph/badge.svg)](https://codecov.io/gh/r-assist/searcher?branch=master)

README.md

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -5,8 +5,8 @@
55

66
<!-- badges: start -->
77

8-
[![Travis-CI Build
9-
Status](https://travis-ci.org/r-assist/searcher.svg?branch=master)](https://travis-ci.org/r-assist/searcher)
8+
[![R build
9+
status](https://github.com/r-assist/searcher/workflows/R-CMD-check/badge.svg)](https://github.com/r-assist/searcher/actions)
1010
[![CRAN RStudio mirror
1111
downloads](http://cranlogs.r-pkg.org/badges/searcher)](http://www.r-pkg.org/pkg/searcher)
1212
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/searcher)](https://cran.r-project.org/package=searcher)

0 commit comments

Comments
 (0)