From 45b68b45442b965a03d1e056e1d176879dc03e0a Mon Sep 17 00:00:00 2001 From: Sebastian Gatscha Date: Fri, 15 Mar 2024 19:50:04 +0100 Subject: [PATCH] rm appveyor, travis, use GHA for pkgdown, checke/test develop branch --- .Rbuildignore | 2 + .github/workflows/R-CMD-check.yaml | 4 +- .github/workflows/pkgdown.yaml | 48 ++++++++++++++++++++++ .github/workflows/test-coverage.yaml | 4 +- .travis.yml | 15 ------- README.Rmd | 3 ++ _pkgdown.yml | 4 ++ appveyor.yml | 60 ---------------------------- 8 files changed, 61 insertions(+), 79 deletions(-) create mode 100644 .github/workflows/pkgdown.yaml delete mode 100644 .travis.yml create mode 100644 _pkgdown.yml delete mode 100644 appveyor.yml diff --git a/.Rbuildignore b/.Rbuildignore index 775414c0..25d3fe25 100644 --- a/.Rbuildignore +++ b/.Rbuildignore @@ -23,3 +23,5 @@ ^inst/htmlwidgets/src ^__TODO\.R$ ^\.github$ +^_pkgdown\.yml$ +^pkgdown$ diff --git a/.github/workflows/R-CMD-check.yaml b/.github/workflows/R-CMD-check.yaml index 14159b77..30737d41 100644 --- a/.github/workflows/R-CMD-check.yaml +++ b/.github/workflows/R-CMD-check.yaml @@ -2,9 +2,9 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [main, master] + branches: [main, master, develop] pull_request: - branches: [main, master] + branches: [main, master, develop] name: R-CMD-check diff --git a/.github/workflows/pkgdown.yaml b/.github/workflows/pkgdown.yaml new file mode 100644 index 00000000..a7276e85 --- /dev/null +++ b/.github/workflows/pkgdown.yaml @@ -0,0 +1,48 @@ +# 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] + release: + types: [published] + workflow_dispatch: + +name: pkgdown + +jobs: + pkgdown: + runs-on: ubuntu-latest + # Only restrict concurrency for non-PR jobs + concurrency: + group: pkgdown-${{ github.event_name != 'pull_request' || github.run_id }} + env: + GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }} + permissions: + contents: write + steps: + - uses: actions/checkout@v4 + + - uses: r-lib/actions/setup-pandoc@v2 + + - uses: r-lib/actions/setup-r@v2 + with: + use-public-rspm: true + + - uses: r-lib/actions/setup-r-dependencies@v2 + with: + extra-packages: any::pkgdown, local::. + needs: website + + - name: Build site + run: pkgdown::build_site_github_pages(new_process = FALSE, install = FALSE) + shell: Rscript {0} + + - name: Deploy to GitHub pages 🚀 + if: github.event_name != 'pull_request' + uses: JamesIves/github-pages-deploy-action@v4.5.0 + with: + clean: false + branch: gh-pages + folder: docs diff --git a/.github/workflows/test-coverage.yaml b/.github/workflows/test-coverage.yaml index 21b8a933..8121e655 100644 --- a/.github/workflows/test-coverage.yaml +++ b/.github/workflows/test-coverage.yaml @@ -2,9 +2,9 @@ # Need help debugging build failures? Start at https://github.com/r-lib/actions#where-to-find-help on: push: - branches: [main, master] + branches: [main, master, develop] pull_request: - branches: [main, master] + branches: [main, master, develop] name: test-coverage diff --git a/.travis.yml b/.travis.yml deleted file mode 100644 index f633f265..00000000 --- a/.travis.yml +++ /dev/null @@ -1,15 +0,0 @@ -# R for travis: see documentation at https://docs.travis-ci.com/user/languages/r - -language: R -cache: packages -sudo: required -dist: trusty - -r_packages: - - leaflet - -before_install: - - sudo add-apt-repository ppa:ubuntugis/ubuntugis-unstable --yes - - sudo apt-get --yes --force-yes update -qq - - sudo apt-get install --yes libudunits2-dev libproj-dev libgeos-dev libgdal-dev - - sudo ldconfig diff --git a/README.Rmd b/README.Rmd index c91975f9..4e30e770 100644 --- a/README.Rmd +++ b/README.Rmd @@ -13,6 +13,9 @@ version <- gsub(" ", "", gsub("Version:", "", grep("Version:", description, valu last_changed <- gsub('-', '--', Sys.Date()) ``` +[![R-CMD-check](https://github.com/trafficonese/leaflet.extras/actions/workflows/R-CMD-check.yaml/badge.svg)](https://github.com/trafficonese/leaflet.extras/actions/workflows/R-CMD-check.yaml) + + [![Project Status: Active – The project is being actively developed.](http://www.repostatus.org/badges/latest/active.svg)](http://www.repostatus.org/#active) [![Last-changedate](https://img.shields.io/badge/last%20change-`r last_changed`-green.svg)](/commits/master) [![License: GPL-3](https://img.shields.io/badge/License-GPLv3-yellow.svg)](https://opensource.org/licenses/GPL-3.0) [![keybase verified](https://img.shields.io/badge/keybase-verified-brightgreen.svg)](https://gist.github.com/bhaskarvk/46fbf2ba7b5713151d7e) [![Travis-CI Build Status](https://travis-ci.org/bhaskarvk/leaflet.extras.svg?branch=master)](https://travis-ci.org/trafficonese/leaflet.extras) [![AppVeyor Build Status](https://ci.appveyor.com/api/projects/status/github/bhaskarvk/leaflet.extras?branch=master&svg=true)](https://ci.appveyor.com/project/trafficonese/leaflet.extras) [![packageversion](https://img.shields.io/badge/Package%20version-`r version`-orange.svg?style=flat-square)](commits/master) [![CRAN_Status_Badge](http://www.r-pkg.org/badges/version/leaflet.extras)](https://cran.r-project.org/package=leaflet.extras) [![](http://cranlogs.r-pkg.org/badges/grand-total/leaflet.extras)](http://cran.rstudio.com/web/packages/leaflet.extras/index.html) ## leaflet.extras diff --git a/_pkgdown.yml b/_pkgdown.yml new file mode 100644 index 00000000..3d4b10a1 --- /dev/null +++ b/_pkgdown.yml @@ -0,0 +1,4 @@ +url: https://trafficonese.github.io/leaflet.extras/ +template: + bootstrap: 5 + diff --git a/appveyor.yml b/appveyor.yml deleted file mode 100644 index ac4c3104..00000000 --- a/appveyor.yml +++ /dev/null @@ -1,60 +0,0 @@ -# DO NOT CHANGE the "init" and "install" sections below - -# Download script file from GitHub -init: - ps: | - $ErrorActionPreference = "Stop" - Invoke-WebRequest http://raw.github.com/krlmlr/r-appveyor/master/scripts/appveyor-tool.ps1 -OutFile "..\appveyor-tool.ps1" - Import-Module '..\appveyor-tool.ps1' - -install: - ps: Bootstrap - -# cache is causing errors -# cache: -# - C:\RLibrary - -# Adapt as necessary starting from here - -build_script: - - travis-tool.sh install_deps - -test_script: - - travis-tool.sh run_tests - -on_failure: - - 7z a failure.zip *.Rcheck\* - - appveyor PushArtifact failure.zip - -artifacts: - - path: '*.Rcheck\**\*.log' - name: Logs - - - path: '*.Rcheck\**\*.out' - name: Logs - - - path: '*.Rcheck\**\*.fail' - name: Logs - - - path: '*.Rcheck\**\*.Rout' - name: Logs - - - path: '\*_*.tar.gz' - name: Bits - - - path: '\*_*.zip' - name: Bits - -environment: - global: - _R_CHECK_FORCE_SUGGESTS_: false - -notifications: - - provider: Email - to: - - bhaskarvk@gmail.com - subject: 'r-appveyor build {{status}}' - message: "https://ci.appveyor.com/project/bhaskarvk/leaflet.extras" - on_build_success: false - on_build_failure: true - on_build_status_changed: true