diff --git a/.Rbuildignore b/.Rbuildignore index 5bd0d2b..9a9df9b 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -1,4 +1,4 @@ ^LICENSE\.md$ ^Makefile$ -^\.travis\.yml$ ^docs/ +^\.github$ diff --git a/.github/.gitignore b/.github/.gitignore new file mode 100644 index 0000000..2d19fc7 --- /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 0000000..145f0dd --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,30 @@ +# For help debugging build failures open an issue on the RStudio community with the 'github-actions' tag. +# https://community.rstudio.com/new-topic?category=Package%20development&tags=github-actions +on: + push: + branches: + - main + - master + pull_request: + branches: + - main + - master + +name: R-CMD-check + +jobs: + R-CMD-check: + runs-on: macOS-latest + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + steps: + - uses: actions/checkout@v2 + - uses: r-lib/actions/setup-r@v1 + - name: Install dependencies + run: | + install.packages(c("remotes", "rcmdcheck")) + remotes::install_deps(dependencies = TRUE) + shell: Rscript {0} + - name: Check + run: rcmdcheck::rcmdcheck(args = "--no-manual", error_on = "error") + shell: Rscript {0} diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 9c25ccd..0000000 --- a/.travis.yml +++ /dev/null @@ -1,19 +0,0 @@ -language: r - -warnings_are_errors: true - -sudo: required - -notifications: - email: - on_success: change - on_failure: always - -before_script: - - export PKG_NAME=$(Rscript -e 'cat(paste0(devtools::as.package(".")$package))') - - export PKG_TARBALL=$(Rscript -e 'pkg <- devtools::as.package("."); cat(paste0(pkg$package,"_",pkg$version,".tar.gz"))') - - R CMD build --no-build-vignettes . - - R CMD INSTALL ${PKG_TARBALL} - - rm ${PKG_TARBALL} - - echo "Session info:" - - Rscript -e "library(${PKG_NAME});devtools::session_info('${PKG_NAME}')" diff --git a/README.md b/README.md index 9d9a0f4..425ab9a 100644 --- a/README.md +++ b/README.md @@ -1,6 +1,6 @@ ## R/GNapi - R package to connect to the [GeneNetwork](http://gn2.genenetwork.org/) API -[![Build Status](https://travis-ci.org/rqtl/GNapi.svg?branch=master)](https://travis-ci.org/rqtl/GNapi) +[![R build status](https://github.com/rqtl/GNapi/workflows/R-CMD-check/badge.svg)](https://github.com/rqtl/GNapi/actions) ---