Skip to content

Commit a258fd6

Browse files
authored
use_tidy_github_actions() (#379)
1 parent 2f7d273 commit a258fd6

11 files changed

+287
-100
lines changed

.github/.gitignore

+1
Original file line numberDiff line numberDiff line change
@@ -0,0 +1 @@
1+
*.html

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

+90
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,90 @@
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: Upload check results
86+
if: failure()
87+
uses: actions/upload-artifact@master
88+
with:
89+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
90+
path: check

.github/workflows/live-api.yml

+59
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,59 @@
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
8+
9+
name: live-api
10+
11+
jobs:
12+
live-api:
13+
runs-on: macOS-latest
14+
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+
shell: Rscript {0}
27+
28+
- name: Cache R packages
29+
if: runner.os != 'Windows'
30+
uses: actions/cache@v1
31+
with:
32+
path: ${{ env.R_LIBS_USER }}
33+
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('.github/depends.Rds') }}
34+
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-
35+
36+
- name: Install dependencies
37+
run: |
38+
remotes::install_deps(dependencies = TRUE)
39+
remotes::install_cran("rcmdcheck")
40+
shell: Rscript {0}
41+
42+
- name: Check
43+
env:
44+
BIGRQUERY_PASSWORD: ${{ secrets.BIGRQUERY_PASSWORD }}
45+
BIGQUERY_TEST_PROJECT: gargle-169921
46+
BIGQUERY_TEST_BUCKET: bigrquery-test-bucket-calliope
47+
_R_CHECK_CRAN_INCOMING_REMOTE_: false
48+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
49+
shell: Rscript {0}
50+
51+
- name: Upload check results
52+
if: failure()
53+
uses: actions/upload-artifact@master
54+
with:
55+
name: live-api-results
56+
path: check
57+
58+
- name: Reveal testthat details
59+
run: find . -name testthat.Rout -exec cat '{}' ';'

.github/workflows/pkgdown.yaml

+42
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

+47
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

+43
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

-42
This file was deleted.

README.Rmd

+1-2
Original file line numberDiff line numberDiff line change
@@ -23,8 +23,7 @@ if (gargle:::secret_can_decrypt("bigrquery")) {
2323

2424
<!-- badges: start -->
2525
[![CRAN Status](https://www.r-pkg.org/badges/version/bigrquery)](https://cran.r-project.org/package=bigrquery)
26-
[![Travis build status](https://travis-ci.org/r-dbi/bigrquery.svg?branch=master)](https://travis-ci.org/r-dbi/bigrquery)
27-
[![AppVeyor build status](https://ci.appveyor.com/api/projects/status/github/r-dbi/bigrquery?branch=master&svg=true)](https://ci.appveyor.com/project/r-dbi/bigrquery)
26+
[![R build status](https://github.com/r-dbi/bigrquery/workflows/R-CMD-check/badge.svg)](https://github.com/r-dbi/bigrquery/actions)
2827
[![Codecov test coverage](https://codecov.io/gh/r-dbi/bigrquery/branch/master/graph/badge.svg)](https://codecov.io/gh/r-dbi/bigrquery?branch=master)
2928
<!-- badges: end -->
3029

README.md

+2-4
Original file line numberDiff line numberDiff line change
@@ -7,10 +7,8 @@
77

88
[![CRAN
99
Status](https://www.r-pkg.org/badges/version/bigrquery)](https://cran.r-project.org/package=bigrquery)
10-
[![Travis build
11-
status](https://travis-ci.org/r-dbi/bigrquery.svg?branch=master)](https://travis-ci.org/r-dbi/bigrquery)
12-
[![AppVeyor build
13-
status](https://ci.appveyor.com/api/projects/status/github/r-dbi/bigrquery?branch=master&svg=true)](https://ci.appveyor.com/project/r-dbi/bigrquery)
10+
[![R build
11+
status](https://github.com/r-dbi/bigrquery/workflows/R-CMD-check/badge.svg)](https://github.com/r-dbi/bigrquery/actions)
1412
[![Codecov test
1513
coverage](https://codecov.io/gh/r-dbi/bigrquery/branch/master/graph/badge.svg)](https://codecov.io/gh/r-dbi/bigrquery?branch=master)
1614
<!-- badges: end -->

0 commit comments

Comments
 (0)