From 1c7ad264c24f41cb048461b8d57be0aef0f7a8cc Mon Sep 17 00:00:00 2001 From: Gregory Jefferis Date: Wed, 24 Jul 2024 21:20:48 +0100 Subject: [PATCH] swtich to github actions --- .github/workflows/R-CMD-check.yaml | 58 ++++++++++++++++++++++++++++++ .travis.yml | 23 ------------ README.md | 2 +- 3 files changed, 59 insertions(+), 24 deletions(-) create mode 100644 .github/workflows/R-CMD-check.yaml delete mode 100644 .travis.yml diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml new file mode 100644 index 0000000..cc53166 --- /dev/null +++ b/.github/workflows/R-CMD-check.yaml @@ -0,0 +1,58 @@ +# Workflow derived from https://github.com/r-lib/actions/tree/v2/examples +# Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help +on: + push: + branches: [main, master] + pull_request: + branches: [main, master] + +name: R-CMD-check + +permissions: read-all + +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: 'release'} + - {os: windows-latest, r: 'release'} + - {os: ubuntu-latest, r: 'devel', http-user-agent: 'release'} + - {os: ubuntu-latest, r: 'release'} + - {os: ubuntu-latest, r: 'oldrel-1'} + + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + R_KEEP_PKG_SOURCE: yes + + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + r-version: ${{ matrix.config.r }} + http-user-agent: ${{ matrix.config.http-user-agent }} + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::rcmdcheck + needs: check + + - name: Install miniconda + run: | + reticulate::install_miniconda() + vfbconnectr::vc_install() + shell: Rscript {0} + + - uses: r-lib/actions/check-r-package@v2 + with: + upload-snapshots: true + build_args: 'c("--no-manual","--compact-vignettes=gs+qpdf")' diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index 883f7fe..0000000 --- a/.travis.yml +++ /dev/null @@ -1,23 +0,0 @@ -# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r - -language: R -cache: packages - -dist: bionic -addons: - apt: - sources: - - deadsnakes - packages: - - python3.7 - - libharfbuzz-dev - - libfribidi-dev - -before_install: - - sudo apt-get update - - sudo apt purge python2.7-minimal - - sudo apt-get install python3 python3-pip python3-setuptools - - python3 -VV - - pip3 install --upgrade pip - - pip3 -V - - pip3 install vfb_connect diff --git a/README.md b/README.md index 8a9c60c..e93376b 100644 --- a/README.md +++ b/README.md @@ -2,8 +2,8 @@ # vfbconnectr -[![Travis build status](https://travis-ci.com/natverse/vfbconnectr.svg?branch=master)](https://travis-ci.com/natverse/vfbconnectr) [![natverse](https://img.shields.io/badge/natverse-Part%20of%20the%20natverse-a241b6)](https://natverse.github.io) +[![R-CMD-check](https://github.com/jefferis/vfbconnectr/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/jefferis/vfbconnectr/actions/workflows/R-CMD-check.yaml) vfbconnectr provides a simple R wrapper (via [reticulate](https://rstudio.github.io/reticulate/)) for the