diff --git a/.github/.gitignore b/.github/.gitignore
new file mode 100644
index 00000000..2d19fc76
--- /dev/null
+++ b/.github/.gitignore
@@ -0,0 +1 @@
+*.html
diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml
new file mode 100644
index 00000000..524275af
--- /dev/null
+++ b/.github/workflows/R-CMD-check.yaml
@@ -0,0 +1,97 @@
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+name: R-CMD-check
+
+jobs:
+ R-CMD-check:
+ runs-on: ${{ matrix.config.os }}
+
+ name: ${{ matrix.config.os }} (${{ matrix.config.r }})
+
+ strategy:
+ fail-fast: false
+ matrix:
+ config:
+ - {os: macOS-latest, r: 'devel'}
+ - {os: macOS-latest, r: 'release'}
+ - {os: windows-latest, r: 'release'}
+ - {os: ubuntu-16.04, r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
+ - {os: ubuntu-16.04, r: 'oldrel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
+ - {os: ubuntu-16.04, r: '3.5', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
+ - {os: ubuntu-16.04, r: '3.4', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
+ - {os: ubuntu-16.04, r: '3.3', rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
+
+ env:
+ R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
+ RSPM: ${{ matrix.config.rspm }}
+ GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
+
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: r-lib/actions/setup-r@master
+ with:
+ r-version: ${{ matrix.config.r }}
+
+ - uses: r-lib/actions/setup-pandoc@master
+
+ - name: Query dependencies
+ run: |
+ install.packages('remotes')
+ saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
+ writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
+ shell: Rscript {0}
+
+ - name: Cache R packages
+ if: runner.os != 'Windows'
+ uses: actions/cache@v1
+ with:
+ path: ${{ env.R_LIBS_USER }}
+ key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
+ restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
+
+ - name: Install system dependencies
+ if: runner.os == 'Linux'
+ env:
+ RHUB_PLATFORM: linux-x86_64-ubuntu-gcc
+ run: |
+ Rscript -e "remotes::install_github('r-hub/sysreqs')"
+ sysreqs=$(Rscript -e "cat(sysreqs::sysreq_commands('DESCRIPTION'))")
+ sudo -s eval "$sysreqs"
+
+ - name: Install dependencies
+ run: |
+ remotes::install_deps(dependencies = TRUE)
+ remotes::install_cran("rcmdcheck")
+ shell: Rscript {0}
+
+ - name: Session info
+ run: |
+ options(width = 100)
+ pkgs <- installed.packages()[, "Package"]
+ sessioninfo::session_info(pkgs, include_base = TRUE)
+ shell: Rscript {0}
+
+ - name: Check
+ env:
+ _R_CHECK_CRAN_INCOMING_: false
+ run: rcmdcheck::rcmdcheck(args = c("--no-manual", "--as-cran"), error_on = "warning", check_dir = "check")
+ shell: Rscript {0}
+
+ - name: Show testthat output
+ if: always()
+ run: find check -name 'testthat.Rout*' -exec cat '{}' \; || true
+ shell: bash
+
+ - name: Upload check results
+ if: failure()
+ uses: actions/upload-artifact@master
+ with:
+ name: ${{ runner.os }}-r${{ matrix.config.r }}-results
+ path: check
diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml
new file mode 100644
index 00000000..2bf64e2d
--- /dev/null
+++ b/.github/workflows/pkgdown.yaml
@@ -0,0 +1,45 @@
+on:
+ push:
+ branches: master
+
+name: pkgdown
+
+jobs:
+ pkgdown:
+ runs-on: macOS-latest
+ env:
+ GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: r-lib/actions/setup-r@master
+
+ - uses: r-lib/actions/setup-pandoc@master
+
+ - name: Query dependencies
+ run: |
+ install.packages('remotes')
+ saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
+ writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
+ shell: Rscript {0}
+
+ - name: Cache R packages
+ uses: actions/cache@v1
+ with:
+ path: ${{ env.R_LIBS_USER }}
+ key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
+ restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
+
+ - name: Install dependencies
+ run: |
+ install.packages("remotes")
+ remotes::install_deps(dependencies = TRUE)
+ remotes::install_dev("pkgdown")
+ shell: Rscript {0}
+
+ - name: Install package
+ run: R CMD INSTALL .
+
+ - name: Deploy package
+ run: pkgdown::deploy_to_branch(new_process = FALSE)
+ shell: Rscript {0}
diff --git a/.github/workflows/pr-commands.yaml b/.github/workflows/pr-commands.yaml
new file mode 100644
index 00000000..0d3cb716
--- /dev/null
+++ b/.github/workflows/pr-commands.yaml
@@ -0,0 +1,51 @@
+on:
+ issue_comment:
+ types: [created]
+name: Commands
+jobs:
+ document:
+ if: startsWith(github.event.comment.body, '/document')
+ name: document
+ runs-on: macOS-latest
+ env:
+ GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v2
+ - uses: r-lib/actions/pr-fetch@master
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ - uses: r-lib/actions/setup-r@master
+ - name: Install dependencies
+ run: Rscript -e 'install.packages(c("remotes", "roxygen2"))' -e 'remotes::install_deps(dependencies = TRUE)'
+ - name: Document
+ run: Rscript -e 'roxygen2::roxygenise()'
+ - name: commit
+ run: |
+ git add man/\* NAMESPACE
+ git commit -m 'Document'
+ - uses: r-lib/actions/pr-push@master
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ style:
+ if: startsWith(github.event.comment.body, '/style')
+ name: style
+ runs-on: macOS-latest
+ env:
+ GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v2
+ - uses: r-lib/actions/pr-fetch@master
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
+ - uses: r-lib/actions/setup-r@master
+ - name: Install dependencies
+ run: Rscript -e 'install.packages("styler")'
+ - name: Style
+ run: Rscript -e 'styler::style_pkg()'
+ - name: commit
+ run: |
+ git add \*.R
+ git commit -m 'Style'
+ - uses: r-lib/actions/pr-push@master
+ with:
+ repo-token: ${{ secrets.GITHUB_TOKEN }}
diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml
new file mode 100644
index 00000000..3058d037
--- /dev/null
+++ b/.github/workflows/test-coverage.yaml
@@ -0,0 +1,46 @@
+on:
+ push:
+ branches:
+ - master
+ pull_request:
+ branches:
+ - master
+
+name: test-coverage
+
+jobs:
+ test-coverage:
+ runs-on: macOS-latest
+ env:
+ GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
+ steps:
+ - uses: actions/checkout@v2
+
+ - uses: r-lib/actions/setup-r@master
+
+ - uses: r-lib/actions/setup-pandoc@master
+
+ - name: Query dependencies
+ run: |
+ install.packages('remotes')
+ saveRDS(remotes::dev_package_deps(dependencies = TRUE), ".github/depends.Rds", version = 2)
+ writeLines(sprintf("R-%i.%i", getRversion()$major, getRversion()$minor), ".github/R-version")
+ shell: Rscript {0}
+
+ - name: Cache R packages
+ uses: actions/cache@v1
+ with:
+ path: ${{ env.R_LIBS_USER }}
+ key: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-${{ hashFiles('.github/depends.Rds') }}
+ restore-keys: ${{ runner.os }}-${{ hashFiles('.github/R-version') }}-1-
+
+ - name: Install dependencies
+ run: |
+ install.packages(c("remotes"))
+ remotes::install_deps(dependencies = TRUE)
+ remotes::install_cran("covr")
+ shell: Rscript {0}
+
+ - name: Test coverage
+ run: covr::codecov()
+ shell: Rscript {0}
diff --git a/DESCRIPTION b/DESCRIPTION
index e69b6857..63d3bfb2 100644
--- a/DESCRIPTION
+++ b/DESCRIPTION
@@ -45,7 +45,8 @@ Suggests:
concaveman,
deldir,
reshape2,
- units (>= 0.4-6)
+ units (>= 0.4-6),
+ covr
Collate:
'RcppExports.R'
'aaa.R'
diff --git a/README.Rmd b/README.Rmd
index 299c6111..ceb2b7ea 100644
--- a/README.Rmd
+++ b/README.Rmd
@@ -14,10 +14,11 @@ knitr::opts_chunk$set(
```
# ggforce
-[](https://travis-ci.org/thomasp85/ggforce)
-[](https://ci.appveyor.com/project/thomasp85/ggforce)
+
+[](https://github.com/thomasp85/ggforce/actions)
[](https://CRAN.R-project.org/package=ggforce)
[](https://CRAN.R-project.org/package=ggforce)
+
*Accelerating ggplot2*
diff --git a/README.md b/README.md
index 1418d77b..268de967 100644
--- a/README.md
+++ b/README.md
@@ -3,12 +3,13 @@
# ggforce
-[](https://travis-ci.org/thomasp85/ggforce)
-[](https://ci.appveyor.com/project/thomasp85/ggforce)
+
+
+[](https://github.com/thomasp85/ggforce/actions)
[](https://CRAN.R-project.org/package=ggforce)
[](https://CRAN.R-project.org/package=ggforce)
+
*Accelerating ggplot2*
diff --git a/codecov.yml b/codecov.yml
new file mode 100644
index 00000000..04c55859
--- /dev/null
+++ b/codecov.yml
@@ -0,0 +1,14 @@
+comment: false
+
+coverage:
+ status:
+ project:
+ default:
+ target: auto
+ threshold: 1%
+ informational: true
+ patch:
+ default:
+ target: auto
+ threshold: 1%
+ informational: true