Skip to content

Commit f35530c

Browse files
committed
GH actions
1 parent 44702ee commit f35530c

File tree

12 files changed

+258
-26
lines changed

12 files changed

+258
-26
lines changed

.Rbuildignore

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -15,3 +15,4 @@ cran-comments.md
1515
^tools
1616
^CRAN-RELEASE
1717
^\.httr-oauth$
18+
^\.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: 96 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,96 @@
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+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
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), ".github/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 }}-1-${{ hashFiles('.github/depends.Rds') }}
56+
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-1-
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+
67+
- name: Install dependencies
68+
run: |
69+
remotes::install_deps(dependencies = TRUE)
70+
remotes::install_cran("rcmdcheck")
71+
shell: Rscript {0}
72+
73+
- name: Session info
74+
run: |
75+
options(width = 100)
76+
pkgs <- installed.packages()[, "Package"]
77+
sessioninfo::session_info(pkgs, include_base = TRUE)
78+
shell: Rscript {0}
79+
80+
- name: Check
81+
env:
82+
_R_CHECK_CRAN_INCOMING_: false
83+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
84+
shell: Rscript {0}
85+
86+
- name: Show testthat output
87+
if: always()
88+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
89+
shell: bash
90+
91+
- name: Upload check results
92+
if: failure()
93+
uses: actions/upload-artifact@master
94+
with:
95+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
96+
path: check

.github/workflows/pkgdown.yaml

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

.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: 45 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
env:
15+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
16+
steps:
17+
- uses: actions/checkout@v2
18+
19+
- uses: r-lib/actions/setup-r@master
20+
21+
- uses: r-lib/actions/setup-pandoc@master
22+
23+
- name: Query dependencies
24+
run: |
25+
install.packages('remotes')
26+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
27+
shell: Rscript {0}
28+
29+
- name: Cache R packages
30+
uses: actions/cache@v1
31+
with:
32+
path: ${{ env.R_LIBS_USER }}
33+
key: macOS-r-4.0-1-${{ hashFiles('.github/depends.Rds') }}
34+
restore-keys: macOS-r-4.0-1-
35+
36+
- name: Install dependencies
37+
run: |
38+
install.packages(c("remotes"))
39+
remotes::install_deps(dependencies = TRUE)
40+
remotes::install_cran("covr")
41+
shell: Rscript {0}
42+
43+
- name: Test coverage
44+
run: covr::codecov()
45+
shell: Rscript {0}

.travis.yml

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

README.Rmd

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -9,10 +9,10 @@ library(dplyr)
99
library(modeldb)
1010
```
1111

12-
[![Build Status](https://travis-ci.org/tidymodels/modeldb.svg?branch=master)](https://travis-ci.org/tidymodels/modeldb)
12+
[![R build status](https://github.com/tidymodels/modeldb/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/modeldb/actions)
1313
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/modeldb)](https://cran.r-project.org/package=modeldb)
14-
[![Coverage Status](https://img.shields.io/codecov/c/github/tidymodels/modeldb/master.svg)](https://codecov.io/github/tidymodels/modeldb?branch=master)
15-
14+
[![Codecov test coverage](https://codecov.io/gh/tidymodels/modeldb/branch/master/graph/badge.svg)](https://codecov.io/gh/tidymodels/modeldb?branch=master)
15+
[![Downloads](http://cranlogs.r-pkg.org/badges/modeldb)](http://cran.rstudio.com/package=modeldb)
1616

1717
Fit models inside the database. **`modeldb` works with most databases back-ends** because it leverages `dplyr` and `dbplyr` for the final SQL translation of the algorithm. It currently supports:
1818

README.md

Lines changed: 5 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,12 @@
11

22
# modeldb <img src="man/figures/logo.png" align="right" alt="" width="120" />
33

4-
[![Build
5-
Status](https://travis-ci.org/tidymodels/modeldb.svg?branch=master)](https://travis-ci.org/tidymodels/modeldb)
4+
[![R build
5+
status](https://github.com/tidymodels/modeldb/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/modeldb/actions)
66
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/modeldb)](https://cran.r-project.org/package=modeldb)
7-
[![Coverage
8-
Status](https://img.shields.io/codecov/c/github/tidymodels/modeldb/master.svg)](https://codecov.io/github/tidymodels/modeldb?branch=master)
7+
[![Codecov test
8+
coverage](https://codecov.io/gh/tidymodels/modeldb/branch/master/graph/badge.svg)](https://codecov.io/gh/tidymodels/modeldb?branch=master)
9+
[![Downloads](http://cranlogs.r-pkg.org/badges/modeldb)](http://cran.rstudio.com/package=modeldb)
910

1011
Fit models inside the database. **`modeldb` works with most databases
1112
back-ends** because it leverages `dplyr` and `dbplyr` for the final SQL

codecov.yml

Lines changed: 8 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -4,6 +4,11 @@ coverage:
44
status:
55
project:
66
default:
7-
target: 90%
8-
threshold: null
9-
patch: off
7+
target: auto
8+
threshold: 1%
9+
informational: true
10+
patch:
11+
default:
12+
target: auto
13+
threshold: 1%
14+
informational: true

0 commit comments

Comments
 (0)