Skip to content

Commit 6fbdff1

Browse files
committed
Init the GitHub Actions transition
1 parent 5a81252 commit 6fbdff1

10 files changed

+262
-120
lines changed

.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: 95 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,95 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
name: R-CMD-check
10+
11+
jobs:
12+
R-CMD-check:
13+
runs-on: ${{ matrix.config.os }}
14+
15+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
16+
17+
strategy:
18+
fail-fast: false
19+
matrix:
20+
config:
21+
- {os: macOS-latest, r: 'devel'}
22+
- {os: macOS-latest, r: '4.0'}
23+
- {os: windows-latest, r: '4.0'}
24+
- {os: ubuntu-16.04, r: '4.0', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
25+
- {os: ubuntu-16.04, r: '3.6', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
26+
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
27+
- {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
28+
- {os: ubuntu-16.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
29+
30+
env:
31+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
32+
RSPM: ${{ matrix.config.rspm }}
33+
34+
steps:
35+
- uses: actions/checkout@v2
36+
37+
- uses: r-lib/actions/setup-r@master
38+
with:
39+
r-version: ${{ matrix.config.r }}
40+
41+
- uses: r-lib/actions/setup-pandoc@master
42+
43+
- name: Query dependencies
44+
run: |
45+
install.packages('remotes')
46+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
47+
shell: Rscript {0}
48+
49+
- name: Cache R packages
50+
if: runner.os != 'Windows'
51+
uses: actions/cache@v1
52+
with:
53+
path: ${{ env.R_LIBS_USER }}
54+
key: ${{ runner.os }}-r-${{ matrix.config.r }}-1-${{ hashFiles('.github/depends.Rds') }}
55+
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-1-
56+
57+
- name: Install system dependencies
58+
if: runner.os == 'Linux'
59+
env:
60+
RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
61+
run: |
62+
Rscript -e "remotes::install_github('r-hub/sysreqs')"
63+
sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
64+
sudo -s eval "$sysreqs"
65+
66+
- name: Install dependencies
67+
run: |
68+
remotes::install_deps(dependencies = TRUE)
69+
remotes::install_cran("rcmdcheck")
70+
shell: Rscript {0}
71+
72+
- name: Session info
73+
run: |
74+
options(width = 100)
75+
pkgs <- installed.packages()[, "Package"]
76+
sessioninfo::session_info(pkgs, include_base = TRUE)
77+
shell: Rscript {0}
78+
79+
- name: Check
80+
env:
81+
_R_CHECK_CRAN_INCOMING_: false
82+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
83+
shell: Rscript {0}
84+
85+
- name: Show testthat output
86+
if: always()
87+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
88+
shell: bash
89+
90+
- name: Upload check results
91+
if: failure()
92+
uses: actions/upload-artifact@master
93+
with:
94+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
95+
path: check

.github/workflows/pkgdown.yaml

Lines changed: 42 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,42 @@
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@v2
12+
13+
- uses: r-lib/actions/setup-r@master
14+
15+
- uses: r-lib/actions/setup-pandoc@master
16+
17+
- name: Query dependencies
18+
run: |
19+
install.packages('remotes')
20+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
21+
shell: Rscript {0}
22+
23+
- name: Cache R packages
24+
uses: actions/cache@v1
25+
with:
26+
path: ${{ env.R_LIBS_USER }}
27+
key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }}
28+
restore-keys: macOS-r-4.0-1-
29+
30+
- name: Install dependencies
31+
run: |
32+
install.packages("remotes")
33+
remotes::install_deps(dependencies = TRUE)
34+
remotes::install_dev("pkgdown")
35+
shell: Rscript {0}
36+
37+
- name: Install package
38+
run: R CMD INSTALL .
39+
40+
- name: Deploy package
41+
run: pkgdown::deploy_to_branch(new_process = FALSE)
42+
shell: Rscript {0}

.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@v2
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: style
30+
runs-on: macOS-latest
31+
steps:
32+
- uses: actions/checkout@v2
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 }}

.github/workflows/test-coverage.yaml

Lines changed: 43 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,43 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
name: test-coverage
10+
11+
jobs:
12+
test-coverage:
13+
runs-on: macOS-latest
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- uses: r-lib/actions/setup-r@master
18+
19+
- uses: r-lib/actions/setup-pandoc@master
20+
21+
- name: Query dependencies
22+
run: |
23+
install.packages('remotes')
24+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
25+
shell: Rscript {0}
26+
27+
- name: Cache R packages
28+
uses: actions/cache@v1
29+
with:
30+
path: ${{ env.R_LIBS_USER }}
31+
key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }}
32+
restore-keys: macOS-r-4.0-1-
33+
34+
- name: Install dependencies
35+
run: |
36+
install.packages(c("remotes"))
37+
remotes::install_deps(dependencies = TRUE)
38+
remotes::install_cran("covr")
39+
shell: Rscript {0}
40+
41+
- name: Test coverage
42+
run: covr::codecov()
43+
shell: Rscript {0}

.travis.yml

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

README.Rmd

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -26,8 +26,11 @@ message("No token available. Code chunks will not be evaluated.")
2626

2727
# googledrive <img src="man/figures/logo.png" align="right" height=140/>
2828

29+
<!-- badges: start -->
2930
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/googledrive)](https://cran.r-project.org/package=googledrive)
30-
[![Build Status](https://travis-ci.org/tidyverse/googledrive.svg?branch=master)](https://travis-ci.org/tidyverse/googledrive)[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/tidyverse/googledrive?branch=master&svg=true)](https://ci.appveyor.com/project/tidyverse/googledrive)[![codecov](https://codecov.io/gh/tidyverse/googledrive/branch/master/graph/badge.svg)](https://codecov.io/gh/tidyverse/googledrive?branch=master)
31+
[![R build status](https://github.com/tidyverse/googledrive/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/googledrive/actions)
32+
[![Codecov test coverage](https://codecov.io/gh/tidyverse/googledrive/branch/master/graph/badge.svg)](https://codecov.io/gh/tidyverse/googledrive?branch=master)
33+
<!-- badges: end -->
3134

3235
## Overview
3336

README.md

Lines changed: 23 additions & 20 deletions
Original file line numberDiff line numberDiff line change
@@ -3,11 +3,14 @@
33

44
# googledrive <img src="man/figures/logo.png" align="right" height=140/>
55

6+
<!-- badges: start -->
7+
68
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/googledrive)](https://cran.r-project.org/package=googledrive)
7-
[![Build
8-
Status](https://travis-ci.org/tidyverse/googledrive.svg?branch=master)](https://travis-ci.org/tidyverse/googledrive)[![AppVeyor
9-
Build
10-
Status](https://ci.appveyor.com/api/projects/status/github/tidyverse/googledrive?branch=master&svg=true)](https://ci.appveyor.com/project/tidyverse/googledrive)[![codecov](https://codecov.io/gh/tidyverse/googledrive/branch/master/graph/badge.svg)](https://codecov.io/gh/tidyverse/googledrive?branch=master)
9+
[![R build
10+
status](https://github.com/tidyverse/googledrive/workflows/R-CMD-check/badge.svg)](https://github.com/tidyverse/googledrive/actions)
11+
[![Codecov test
12+
coverage](https://codecov.io/gh/tidyverse/googledrive/branch/master/graph/badge.svg)](https://codecov.io/gh/tidyverse/googledrive?branch=master)
13+
<!-- badges: end -->
1114

1215
## Overview
1316

@@ -39,22 +42,22 @@ on <https://drive.google.com> (up to `n_max = 25`, in this case):
3942
library("googledrive")
4043
drive_find(n_max = 25)
4144
#> # A tibble: 14 x 3
42-
#> name id drive_resource
43-
#> * <chr> <chr> <list>
44-
#> 1 chicken-perm-article.t… 1oWpfPYR-77c-DdvoW30682F9Gde8Z… <named list [39
45-
#> 2 googledrive-NEWS.md 15pfwRfXvpxekxhdERmSUnoxQY5K70… <named list [38…
46-
#> 3 def 1hr4EFw3r5vAMm5Jgw2SsFluBpN-oA… <named list [32…
47-
#> 4 abc 11lidFPceZAcNTHasQARiwAhE0NgmS… <named list [32…
48-
#> 5 THANKS 1zNZpVO4MCjNUFUHOwSv3WlyUh4Dq_… <named list [39…
49-
#> 6 BioC_mirrors.csv 1vV0fPdNOyo3Ti9ofA38MuTQm27pXv… <named list [38…
50-
#> 7 logo.jpg 1OFeNdd63NfoavqvDf5-xa3LORiamf… <named list [40…
51-
#> 8 Rlogo.svg 11sxsw-ux-UjQjzVdxd1wjNz37hJeB… <named list [40
52-
#> 9 Rlogo.pdf 1cn7oVxQRgD0l_hCI4nrSSWrKeVFys… <named list [39…
53-
#> 10 DESCRIPTION 1MjV4stVPhlMNz1AcrIizcL7yTcVaR… <named list [39
54-
#> 11 chicken.txt 1xmwFZ_UN-CSs3Ic2aPUw22DbxZxoe… <named list [39
55-
#> 12 chicken.pdf 1eK9ozP1TZjXfAgaAGmP9GrUTovGUa… <named list [39
56-
#> 13 chicken.jpg 1JnGjIdruQXErd20xR_ecAzN3yP_fT… <named list [40
57-
#> 14 chicken.csv 1eHoOi9Ch3zk3_QBRKCJajFEIO4aeG… <named list [38
45+
#> name id drive_resource
46+
#> * <chr> <chr> <list>
47+
#> 1 Rlogo.pdf 1cn7oVxQRgD0l_hCI4nrSSWrKeVFysUp7 <named list [39]>
48+
#> 2 THANKS 1zNZpVO4MCjNUFUHOwSv3WlyUh4Dq_du3 <named list [39]>
49+
#> 3 chicken-perm-article.txt 1oWpfPYR-77c-DdvoW30682F9Gde8Zpn- <named list [39]>
50+
#> 4 googledrive-NEWS.md 15pfwRfXvpxekxhdERmSUnoxQY5K701y7 <named list [38]>
51+
#> 5 def 1hr4EFw3r5vAMm5Jgw2SsFluBpN-oAC-x <named list [32]>
52+
#> 6 abc 11lidFPceZAcNTHasQARiwAhE0NgmSfJN <named list [32]>
53+
#> 7 BioC_mirrors.csv 1vV0fPdNOyo3Ti9ofA38MuTQm27pXvYq5 <named list [38]>
54+
#> 8 logo.jpg 1OFeNdd63NfoavqvDf5-xa3LORiamfKXS <named list [40]>
55+
#> 9 Rlogo.svg 11sxsw-ux-UjQjzVdxd1wjNz37hJeBrBu <named list [40]>
56+
#> 10 DESCRIPTION 1MjV4stVPhlMNz1AcrIizcL7yTcVaRuBo <named list [39]>
57+
#> 11 chicken.txt 1xmwFZ_UN-CSs3Ic2aPUw22DbxZxoenVT <named list [39]>
58+
#> 12 chicken.pdf 1eK9ozP1TZjXfAgaAGmP9GrUTovGUaO9S <named list [39]>
59+
#> 13 chicken.jpg 1JnGjIdruQXErd20xR_ecAzN3yP_fTcfF <named list [40]>
60+
#> 14 chicken.csv 1eHoOi9Ch3zk3_QBRKCJajFEIO4aeGINr <named list [38]>
5861
```
5962

6063
## Contributing

0 commit comments

Comments
 (0)