Skip to content

Commit 56447fd

Browse files
committed
Update to latest github actions and update README
1 parent d7dedc4 commit 56447fd

10 files changed

+143
-46
lines changed

.Rbuildignore

+1
Original file line numberDiff line numberDiff line change
@@ -11,3 +11,4 @@
1111
^codecov\.yml$
1212
^\.github/workflows/R-CMD-check\.yaml$
1313
^\.github/workflows/pr-commands\.yaml$
14+
^\.github$

.github/.gitignore

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

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

+35-13
Original file line numberDiff line numberDiff line change
@@ -1,4 +1,10 @@
1-
on: [push, pull_request]
1+
on:
2+
push:
3+
branches:
4+
- master
5+
pull_request:
6+
branches:
7+
- master
28

39
name: R-CMD-check
410

@@ -12,18 +18,19 @@ jobs:
1218
fail-fast: false
1319
matrix:
1420
config:
15-
- {os: windows-latest, r: '3.6'}
16-
- {os: windows-latest, r: 'devel'}
17-
- {os: macOS-latest, r: '3.6'}
18-
# - {os: ubuntu-16.04, r: '3.2', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
19-
# - {os: ubuntu-16.04, r: '3.3', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
20-
- {os: ubuntu-16.04, r: '3.4', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
21-
- {os: ubuntu-16.04, r: '3.5', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
22-
- {os: ubuntu-16.04, r: '3.6', rspm: "https://demo.rstudiopm.com/all/__linux__/xenial/latest"}
21+
- {os: macOS-latest, r: 'devel'}
22+
- {os: macOS-latest, r: 'release'}
23+
- {os: windows-latest, r: 'release'}
24+
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
25+
- {os: ubuntu-16.04, r: 'oldrel', 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"}
2329

2430
env:
2531
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
2632
RSPM: ${{ matrix.config.rspm }}
33+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
2734

2835
steps:
2936
- uses: actions/checkout@v2
@@ -37,16 +44,17 @@ jobs:
3744
- name: Query dependencies
3845
run: |
3946
install.packages('remotes')
40-
saveRDS(remotes::dev_package_deps(dependencies = TRUE), "depends.Rds", version = 2)
47+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
48+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
4149
shell: Rscript {0}
4250

4351
- name: Cache R packages
4452
if: runner.os != 'Windows'
4553
uses: actions/cache@v1
4654
with:
4755
path: ${{ env.R_LIBS_USER }}
48-
key: ${{ runner.os }}-r-${{ matrix.config.r }}-${{ hashFiles('depends.Rds') }}
49-
restore-keys: ${{ runner.os }}-r-${{ matrix.config.r }}-
56+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
57+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
5058

5159
- name: Install system dependencies
5260
if: runner.os == 'Linux'
@@ -63,10 +71,24 @@ jobs:
6371
remotes::install_cran("rcmdcheck")
6472
shell: Rscript {0}
6573

74+
- name: Session info
75+
run: |
76+
options(width = 100)
77+
pkgs <- installed.packages()[, "Package"]
78+
sessioninfo::session_info(pkgs, include_base = TRUE)
79+
shell: Rscript {0}
80+
6681
- name: Check
67-
run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "warning", check_dir = "check")
82+
env:
83+
_R_CHECK_CRAN_INCOMING_: false
84+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
6885
shell: Rscript {0}
6986

87+
- name: Show testthat output
88+
if: always()
89+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
90+
shell: bash
91+
7092
- name: Upload check results
7193
if: failure()
7294
uses: actions/upload-artifact@master

.github/workflows/pkgdown.yaml

+45
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,45 @@
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+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
24+
shell: Rscript {0}
25+
26+
- name: Cache R packages
27+
uses: actions/cache@v1
28+
with:
29+
path: ${{ env.R_LIBS_USER }}
30+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
31+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
32+
33+
- name: Install dependencies
34+
run: |
35+
install.packages("remotes")
36+
remotes::install_deps(dependencies = TRUE)
37+
remotes::install_dev("pkgdown")
38+
shell: Rscript {0}
39+
40+
- name: Install package
41+
run: R CMD INSTALL .
42+
43+
- name: Deploy package
44+
run: pkgdown::deploy_to_branch(new_process = FALSE)
45+
shell: Rscript {0}

.github/workflows/pr-commands.yaml

+4-5
Original file line numberDiff line numberDiff line change
@@ -7,6 +7,8 @@ jobs:
77
if: startsWith(github.event.comment.body, '/document')
88
name: document
99
runs-on: macOS-latest
10+
env:
11+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
1012
steps:
1113
- uses: actions/checkout@v2
1214
- uses: r-lib/actions/pr-fetch@master
@@ -28,6 +30,8 @@ jobs:
2830
if: startsWith(github.event.comment.body, '/style')
2931
name: style
3032
runs-on: macOS-latest
33+
env:
34+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
3135
steps:
3236
- uses: actions/checkout@v2
3337
- uses: r-lib/actions/pr-fetch@master
@@ -45,8 +49,3 @@ jobs:
4549
- uses: r-lib/actions/pr-push@master
4650
with:
4751
repo-token: ${{ secrets.GITHUB_TOKEN }}
48-
# A mock job just to ensure we have a successful build status
49-
finish:
50-
runs-on: ubuntu-latest
51-
steps:
52-
- run: true

.github/workflows/test-coverage.yaml

+46
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,46 @@
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+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
28+
shell: Rscript {0}
29+
30+
- name: Cache R packages
31+
uses: actions/cache@v1
32+
with:
33+
path: ${{ env.R_LIBS_USER }}
34+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
35+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
36+
37+
- name: Install dependencies
38+
run: |
39+
install.packages(c("remotes"))
40+
remotes::install_deps(dependencies = TRUE)
41+
remotes::install_cran("covr")
42+
shell: Rscript {0}
43+
44+
- name: Test coverage
45+
run: covr::codecov()
46+
shell: Rscript {0}

.travis.yml

-20
This file was deleted.

README.Rmd

+8-3
Original file line numberDiff line numberDiff line change
@@ -1,3 +1,10 @@
1+
---
2+
output: github_document
3+
editor_options:
4+
chunk_output_type: console
5+
---
6+
7+
<!-- README.md is generated from README.Rmd. Please edit that file -->
18

29
```{r setup, include = FALSE}
310
knitr::opts_chunk$set(
@@ -10,10 +17,8 @@ knitr::opts_chunk$set(
1017

1118
# dials
1219

13-
[![Build Status](https://travis-ci.org/tidymodels/dials.svg?branch=master)](https://travis-ci.org/tidymodels/dials)
1420
[![R build status](https://github.com/tidymodels/dials/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/dials/actions)
15-
[![Coverage status](https://codecov.io/gh/tidymodels/dials/branch/master/graph/badge.svg)](https://codecov.io/github/tidymodels/dials?branch=master)
16-
[![Codecov test coverage](https://codecov.io/gh/topepo/dials/branch/master/graph/badge.svg)](https://codecov.io/gh/topepo/dials?branch=master)
21+
[![Codecov test coverage](https://codecov.io/gh/tidymodels/dials/branch/master/graph/badge.svg)](https://codecov.io/gh/tidymodels/dials?branch=master)
1722
[![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/dials)](https://CRAN.R-project.org/package=dials)
1823
[![Downloads](http://cranlogs.r-pkg.org/badges/dials)](https://CRAN.R-project.org/package=dials)
1924
[![Lifecycle: experimental](https://img.shields.io/badge/lifecycle-experimental-orange.svg)](https://www.tidyverse.org/lifecycle/#experimental)

README.md

+1-5
Original file line numberDiff line numberDiff line change
@@ -3,14 +3,10 @@
33

44
# dials
55

6-
[![Build
7-
Status](https://travis-ci.org/tidymodels/dials.svg?branch=master)](https://travis-ci.org/tidymodels/dials)
86
[![R build
97
status](https://github.com/tidymodels/dials/workflows/R-CMD-check/badge.svg)](https://github.com/tidymodels/dials/actions)
10-
[![Coverage
11-
status](https://codecov.io/gh/tidymodels/dials/branch/master/graph/badge.svg)](https://codecov.io/github/tidymodels/dials?branch=master)
128
[![Codecov test
13-
coverage](https://codecov.io/gh/topepo/dials/branch/master/graph/badge.svg)](https://codecov.io/gh/topepo/dials?branch=master)
9+
coverage](https://codecov.io/gh/tidymodels/dials/branch/master/graph/badge.svg)](https://codecov.io/gh/tidymodels/dials?branch=master)
1410
[![CRAN\_Status\_Badge](http://www.r-pkg.org/badges/version/dials)](https://CRAN.R-project.org/package=dials)
1511
[![Downloads](http://cranlogs.r-pkg.org/badges/dials)](https://CRAN.R-project.org/package=dials)
1612
[![Lifecycle:

codecov.yml

+2
Original file line numberDiff line numberDiff line change
@@ -6,7 +6,9 @@ coverage:
66
default:
77
target: auto
88
threshold: 1%
9+
informational: true
910
patch:
1011
default:
1112
target: auto
1213
threshold: 1%
14+
informational: true

0 commit comments

Comments
 (0)