briatte / ggnetwork

Geoms to plot networks with ggplot2
https://briatte.github.io/ggnetwork/
146 stars 28 forks source link

Migrate from Travis CI to GitHub Actions #66

Open briatte opened 3 years ago

briatte commented 3 years ago

https://ropensci.org/blog/2020/11/19/moving-away-travis/

Old .travis.yml settings copied below for reference. covr::coveralls() is still mentioned, but was not in use.

Things to copy:

All of those things are thankfully covered in the examples of r-lib/actions:

https://github.com/r-lib/actions/tree/master/examples

language: R
cache: packages
sudo: true

env:
  global:
    - _R_CHECK_FORCE_SUGGESTS_=false
    - R_REMOTES_NO_ERRORS_FROM_WARNINGS=true
    - _R_CHECK_SYSTEM_CLOCK_=false

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
  - Rscript -e 'update.packages(ask = FALSE)'

r_github_packages:
  - r-lib/covr

matrix:
  include:
  - r: devel
  - r: release
    after_success: Rscript -e 'covr::codecov()'
    before_deploy: Rscript -e 'remotes::install_cran("pkgdown")'
    deploy:
      provider: script
      script: Rscript -e 'pkgdown::deploy_site_github()'
      skip_cleanup: true
  - r: 3.5
  - r: 3.6

after_success:
  - Rscript -e 'covr::coveralls(); covr::codecov()'

notifications:
  email:
    on_success: change
    on_failure: change
briatte commented 3 years ago

Done, mostly. Left to do:

https://fromthebottomoftheheap.net/2020/04/30/rendering-your-readme-with-github-actions/

briatte commented 3 years ago

This will require renv:

Via the help paragraph for the bookdown GHA:

https://github.com/r-lib/actions/tree/master/examples#build-bookdown-site

Gavin's workflow:

https://github.com/gavinsimpson/gratia/blob/master/.github/workflows/readme-renderer.yaml

briatte commented 3 years ago

Used an even simpler GHA:

https://www.etiennebacher.com/posts/2021-03-19-use-github-actions-with-r-markdown-and-distill/

This removes the use of renv, which should fix #68.

briatte commented 1 year ago

New issue: https://github.com/briatte/ggnetwork/actions/runs/4347078171