Fix class check suggestion #17
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: R package | |
on: | |
push: | |
branches: [ master ] | |
pull_request: | |
branches: [ master ] | |
jobs: | |
build: | |
runs-on: ubuntu-22.04 | |
steps: | |
- uses: actions/checkout@v2 | |
- uses: r-lib/actions/setup-r@v2 | |
- name: Install dependencies for devtools | |
run: | | |
sudo apt-get update -y | |
sudo apt-get install libgit2-dev libssh2-1-dev libcurl4-openssl-dev libharfbuzz-dev libfribidi-dev pandoc -y | |
- name: Install devtools | |
run: install.packages("devtools") | |
shell: Rscript {0} | |
- name: Check code style | |
run: Rscript inst/lint.R | |
- name: Install dependencies | |
run: devtools::install_deps(dependencies = TRUE) | |
shell: Rscript {0} | |
- name: Check documentation | |
run: Rscript inst/document.R | |
- name: Check package (as CRAN) | |
run: devtools::check(document = FALSE, args = "--no-tests", error_on = "note") | |
shell: Rscript {0} | |
- name: Install package | |
run: devtools::install() | |
shell: Rscript {0} | |
- name: Testthat | |
run: devtools::test() | |
shell: Rscript {0} | |
- name: Coverage | |
run: print(devtools::test_coverage()) | |
shell: Rscript {0} | |
- name: Check on Mac OS | |
env: | |
RHUB_TOKEN: ${{ secrets.RHUB_TOKEN }} | |
run: Rscript inst/rhubcheck.R "macos-highsierra-release-cran" "$RHUB_TOKEN" | |
- name: Check on Windows | |
env: | |
RHUB_TOKEN: ${{ secrets.RHUB_TOKEN }} | |
run: Rscript inst/rhubcheck.R "windows-x86_64-devel" "$RHUB_TOKEN" |