Skip to content

Commit ae7c4d6

Browse files
committed
Update CI
1 parent df7cd43 commit ae7c4d6

13 files changed

Lines changed: 285 additions & 65 deletions

.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: 106 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,106 @@
1+
# NOTE: This workflow is overkill for most R packages
2+
# check-standard.yaml is likely a better choice
3+
# usethis::use_github_action("check-standard") will install it.
4+
#
5+
# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag.
6+
# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions
7+
on:
8+
push:
9+
branches:
10+
- main
11+
- master
12+
pull_request:
13+
branches:
14+
- main
15+
- master
16+
17+
name: R-CMD-check
18+
19+
jobs:
20+
R-CMD-check:
21+
runs-on: ${{ matrix.config.os }}
22+
23+
name: ${{ matrix.config.os }} (${{ matrix.config.r }})
24+
25+
strategy:
26+
fail-fast: false
27+
matrix:
28+
config:
29+
- {os: macOS-latest, r: 'release'}
30+
- {os: windows-latest, r: 'release'}
31+
- {os: windows-latest, r: '3.6'}
32+
- {os: ubuntu-16.04, r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest", http-user-agent: "R/4.0.0 (ubuntu-16.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
33+
- {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
34+
- {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
35+
- {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
36+
- {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
37+
- {os: ubuntu-16.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
38+
39+
env:
40+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
41+
RSPM: ${{ matrix.config.rspm }}
42+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
43+
44+
steps:
45+
- uses: actions/checkout@v2
46+
47+
- uses: r-lib/actions/setup-r@v1
48+
with:
49+
r-version: ${{ matrix.config.r }}
50+
http-user-agent: ${{ matrix.config.http-user-agent }}
51+
52+
- uses: r-lib/actions/setup-pandoc@v1
53+
54+
- name: Query dependencies
55+
run: |
56+
install.packages('remotes')
57+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
58+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
59+
shell: Rscript {0}
60+
61+
- name: Cache R packages
62+
if: runner.os != 'Windows'
63+
uses: actions/cache@v2
64+
with:
65+
path: ${{ env.R_LIBS_USER }}
66+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
67+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
68+
69+
- name: Install system dependencies
70+
if: runner.os == 'Linux'
71+
run: |
72+
while read -r cmd
73+
do
74+
eval sudo $cmd
75+
done < <(Rscript -e 'writeLines(remotes::system_requirements("ubuntu", "16.04"))')
76+
77+
- name: Install dependencies
78+
run: |
79+
remotes::install_deps(dependencies = TRUE)
80+
remotes::install_cran("rcmdcheck")
81+
shell: Rscript {0}
82+
83+
- name: Session info
84+
run: |
85+
options(width = 100)
86+
pkgs <- installed.packages()[, "Package"]
87+
sessioninfo::session_info(pkgs, include_base = TRUE)
88+
shell: Rscript {0}
89+
90+
- name: Check
91+
env:
92+
_R_CHECK_CRAN_INCOMING_: false
93+
run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
94+
shell: Rscript {0}
95+
96+
- name: Show testthat output
97+
if: always()
98+
run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
99+
shell: bash
100+
101+
- name: Upload check results
102+
if: failure()
103+
uses: actions/upload-artifact@main
104+
with:
105+
name: ${{ runner.os }}-r${{ matrix.config.r }}-results
106+
path: check

.github/workflows/pkgdown.yaml

Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- master
6+
7+
name: pkgdown
8+
9+
jobs:
10+
pkgdown:
11+
runs-on: macOS-latest
12+
env:
13+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
14+
steps:
15+
- uses: actions/checkout@v2
16+
17+
- uses: r-lib/actions/setup-r@v1
18+
19+
- uses: r-lib/actions/setup-pandoc@v1
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+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
26+
shell: Rscript {0}
27+
28+
- name: Cache R packages
29+
uses: actions/cache@v2
30+
with:
31+
path: ${{ env.R_LIBS_USER }}
32+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
33+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
34+
35+
- name: Install dependencies
36+
run: |
37+
remotes::install_deps(dependencies = TRUE)
38+
install.packages("pkgdown", type = "binary")
39+
shell: Rscript {0}
40+
41+
- name: Install package
42+
run: R CMD INSTALL .
43+
44+
- name: Deploy package
45+
run: |
46+
git config --local user.email "actions@github.com"
47+
git config --local user.name "GitHub Actions"
48+
Rscript -e 'pkgdown::deploy_to_branch(new_process = FALSE)'

.github/workflows/pr-commands.yaml

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
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@v1
15+
with:
16+
repo-token: ${{ secrets.GITHUB_TOKEN }}
17+
- uses: r-lib/actions/setup-r@v1
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 config --local user.email "actions@github.com"
25+
git config --local user.name "GitHub Actions"
26+
git add man/\* NAMESPACE
27+
git commit -m 'Document'
28+
- uses: r-lib/actions/pr-push@v1
29+
with:
30+
repo-token: ${{ secrets.GITHUB_TOKEN }}
31+
style:
32+
if: startsWith(github.event.comment.body, '/style')
33+
name: style
34+
runs-on: macOS-latest
35+
env:
36+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
37+
steps:
38+
- uses: actions/checkout@v2
39+
- uses: r-lib/actions/pr-fetch@v1
40+
with:
41+
repo-token: ${{ secrets.GITHUB_TOKEN }}
42+
- uses: r-lib/actions/setup-r@v1
43+
- name: Install dependencies
44+
run: Rscript -e 'install.packages("styler")'
45+
- name: Style
46+
run: Rscript -e 'styler::style_pkg()'
47+
- name: commit
48+
run: |
49+
git config --local user.email "actions@github.com"
50+
git config --local user.name "GitHub Actions"
51+
git add \*.R
52+
git commit -m 'Style'
53+
- uses: r-lib/actions/pr-push@v1
54+
with:
55+
repo-token: ${{ secrets.GITHUB_TOKEN }}
Lines changed: 48 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,48 @@
1+
on:
2+
push:
3+
branches:
4+
- main
5+
- master
6+
pull_request:
7+
branches:
8+
- main
9+
- master
10+
11+
name: test-coverage
12+
13+
jobs:
14+
test-coverage:
15+
runs-on: macOS-latest
16+
env:
17+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
18+
steps:
19+
- uses: actions/checkout@v2
20+
21+
- uses: r-lib/actions/setup-r@v1
22+
23+
- uses: r-lib/actions/setup-pandoc@v1
24+
25+
- name: Query dependencies
26+
run: |
27+
install.packages('remotes')
28+
saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
29+
writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
30+
shell: Rscript {0}
31+
32+
- name: Cache R packages
33+
uses: actions/cache@v2
34+
with:
35+
path: ${{ env.R_LIBS_USER }}
36+
key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
37+
restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
38+
39+
- name: Install dependencies
40+
run: |
41+
install.packages(c("remotes"))
42+
remotes::install_deps(dependencies = TRUE)
43+
remotes::install_cran("covr")
44+
shell: Rscript {0}
45+
46+
- name: Test coverage
47+
run: covr::codecov()
48+
shell: Rscript {0}

.travis.yml

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

DESCRIPTION

Lines changed: 4 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -34,7 +34,8 @@ Imports:
3434
viridis,
3535
rlang,
3636
tidygraph,
37-
graphlayouts (>= 0.5.0)
37+
graphlayouts (>= 0.5.0),
38+
withr
3839
Suggests:
3940
network,
4041
knitr,
@@ -43,7 +44,8 @@ Suggests:
4344
tibble,
4445
seriation,
4546
deldir,
46-
gganimate
47+
gganimate,
48+
covr
4749
LinkingTo: Rcpp
4850
RoxygenNote: 7.0.2
4951
Depends:

NEWS.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@
22

33
* Fix bug in faceting functions where using algorithms based on sampling
44
directly would result in errors
5+
* Move CI to GitHub Actions
56

67
# ggraph 2.0.3
78

README.Rmd

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -15,10 +15,10 @@ knitr::opts_chunk$set(
1515
# ggraph <img src="man/figures/logo.png" align="right" />
1616

1717
<!-- badges: start -->
18-
[![Travis-CI Build Status](https://travis-ci.org/thomasp85/ggraph.svg?branch=master)](https://travis-ci.org/thomasp85/ggraph)
19-
[![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/thomasp85/ggraph?branch=master&svg=true)](https://ci.appveyor.com/project/thomasp85/ggraph)
18+
[![R build status](https://github.com/thomasp85/ggraph/workflows/R-CMD-check/badge.svg)](https://github.com/thomasp85/ggraph/actions)
2019
[![CRAN_Release_Badge](http://www.r-pkg.org/badges/version-ago/ggraph)](https://CRAN.R-project.org/package=ggraph)
2120
[![CRAN_Download_Badge](http://cranlogs.r-pkg.org/badges/ggraph)](https://CRAN.R-project.org/package=ggraph)
21+
[![Codecov test coverage](https://codecov.io/gh/thomasp85/ggraph/branch/master/graph/badge.svg)](https://codecov.io/gh/thomasp85/ggraph?branch=master)
2222
<!-- badges: end -->
2323

2424
*/dʒiː.dʒɪˈrɑːf/* (or g-giraffe)

README.md

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

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

8-
[![Travis-CI Build
9-
Status](https://travis-ci.org/thomasp85/ggraph.svg?branch=master)](https://travis-ci.org/thomasp85/ggraph)
10-
[![AppVeyor Build
11-
Status](https://ci.appveyor.com/api/projects/status/github/thomasp85/ggraph?branch=master&svg=true)](https://ci.appveyor.com/project/thomasp85/ggraph)
8+
[![R build
9+
status](https://github.com/thomasp85/ggraph/workflows/R-CMD-check/badge.svg)](https://github.com/thomasp85/ggraph/actions)
1210
[![CRAN\_Release\_Badge](http://www.r-pkg.org/badges/version-ago/ggraph)](https://CRAN.R-project.org/package=ggraph)
1311
[![CRAN\_Download\_Badge](http://cranlogs.r-pkg.org/badges/ggraph)](https://CRAN.R-project.org/package=ggraph)
12+
[![Codecov test
13+
coverage](https://codecov.io/gh/thomasp85/ggraph/branch/master/graph/badge.svg)](https://codecov.io/gh/thomasp85/ggraph?branch=master)
1414
<!-- badges: end -->
1515

1616
*/dʒiː.dʒɪˈrɑːf/* (or g-giraffe)
@@ -65,9 +65,9 @@ understand:
6565
Nodes**](http://www.data-imaginist.com/2017/ggraph-introduction-nodes/)
6666
are the connected entities in the relational structure. These can be
6767
plotted using the `geom_node_*()` family of geoms. Some node geoms
68-
make more sense for certain layouts, e.g. `geom_node_tile()` for
68+
make more sense for certain layouts, e.g. `geom_node_tile()` for
6969
treemaps and icicle plots, while others are more general purpose,
70-
e.g. `geom_node_point()`.
70+
e.g. `geom_node_point()`.
7171
3. [**The
7272
Edges**](http://www.data-imaginist.com/2017/ggraph-introduction-edges/)
7373
are the connections between the entities in the relational

0 commit comments

Comments
 (0)