GitHub Actions for R

6170c1d1970baf2a36a9ae2955e47ff3?s=47 Jim Hester
January 29, 2020

GitHub Actions for R

Open source R packages on GitHub often take advantage of continuous integration services to automatically check their packages for errors. This is very useful to catch things quickly, as well and increasing confidence for proposed changes, as the Pull Requests can be checked before they are merged. Travis-CI and Appveyor are the most popular current methods. However a new service, GitHub Actions, shows promise for being more featureful and simpler to configure and debug. This talk demonstrates using this service for R packages and projects and how to configure them for your own use in packages and reports.

6170c1d1970baf2a36a9ae2955e47ff3?s=128

Jim Hester

January 29, 2020
Tweet

Transcript

  1. GitHub Actions for Jim Hester

  2. Continuous Integration ensure YOU don't break project ensure reproducibility! Not

    just for R p ackages! ensure OTHERS don't break project
  3. Continuous Integration "If it hurts, do it more often" -

    Martin Fowler P ain Time between Actions
  4. Continuous Integration "If it hurts, do it more often" -

    Martin Fowler
  5. Continuous Integration "If it hurts, do it more often" -

    Martin Fowler
  6. Continuous Integration "If it hurts, do it more often" -

    Martin Fowler
  7. What? How? Why?

  8. What? How? Why? linux

  9. Windows What? How? Why? linux

  10. Windows What? How? Why? macOS linux

  11. Docker Windows What? How? Why? macOS linux

  12. Docker Windows What? How? Why? macOS linux 20 Concurrent Jobs!

    6 hours per job!!!
  13. Docker Windows What? How? Why? macOS linux 20 Concurrent Jobs!

    6 hours per job!!! Requires sep arate setup and Authentication???
  14. Docker Windows What? How? Why? macOS linux 20 Concurrent Jobs!

    6 hours per job!!! Requires sep arate setup and Authentication???
  15. Docker Windows What? How? Why? Is it free??? macOS linux

    20 Concurrent Jobs! 6 hours per job!!! Requires sep arate setup and Authentication???
  16. Docker Windows What? How? Why? Is it free??? macOS linux

    for open source, academic or educational repositories 20 Concurrent Jobs! 6 hours per job!!! Requires sep arate setup and Authentication???
  17. Operating Systems Concurrent builds maximum job Ease of setup GitHub

    Actions 20 360 minutes Travis CI 3 50 minutes Circle CI 4 300 minutes Appveyor 1 60 minutes
  18. Azure Pipelines?

  19. Azure Pipelines? ++ More mature than GitHub Actions

  20. Azure Pipelines? ++ More mature than GitHub Actions −− Much

    more challenging to Setup
  21. Azure Pipelines? ++ More mature than GitHub Actions −− Much

    more challenging to Setup GitHub Actions based on Azure pipelines
  22. What? Why? How?

  23. library(usethis) use_github_actions() What? Why? How?

  24. library(usethis) use_github_actions() What? Why? How?

  25. library(usethis) use_github_actions() What? Why? How?

  26. library(usethis) use_github_actions() What? Why? How?

  27. library(usethis) use_github_actions() What? Why? How?

  28. library(usethis) use_github_actions() What? Why? How?

  29. library(usethis) use_github_actions() What? Why? How?

  30. library(usethis) use_github_actions_tidy()

  31. library(usethis) use_github_actions_tidy()

  32. library(usethis) use_github_actions_tidy() What? Why? How? Matrix builds!

  33. library(usethis) use_github_actions_tidy() What? Why? How? Matrix builds! Multiple OS!

  34. library(usethis) use_github_actions_tidy() What? Why? How? Matrix builds! Multiple OS! Multiple

    R Versions!
  35. library(usethis) use_github_actions_tidy() What? Why? How? Matrix builds! Multiple OS! RSPM

    linux binaries! Multiple R Versions!
  36. library(usethis) use_github_actions_tidy() What? Why? How? P ackage Caching!

  37. library(usethis) use_github_actions_tidy() What? Why? How? Queries and inst alls System

    Dependencies!
  38. library(usethis) use_github_actions_tidy() What? Why? How? Upload full check results!

  39. library(usethis) use_github_actions_tidy() What? Why? How? Record and upload code coverage!

  40. pkgdown requires a Personal Access token blogdown requires a netlify

    deploy token Bookdown requires a netlify deploy token use_github_action("pkgdown.y aml") use_github_action("blogdown.y aml") use_github_action("bookdown.y aml") github.com/r-lib/actions
  41. blogdown requires a netlify deploy token use_github_action("blogdown.y aml")

  42. blogdown requires a netlify deploy token use_github_action("blogdown.y aml")

  43. blogdown requires a netlify deploy token use_github_action("blogdown.y aml") Inst all

    R & p andoc
  44. blogdown requires a netlify deploy token use_github_action("blogdown.y aml") Inst all

    R p ackages and hugo
  45. blogdown requires a netlify deploy token use_github_action("blogdown.y aml") Build the

    site!
  46. blogdown requires a netlify deploy token use_github_action("blogdown.y aml") deploy to

    netlify
  47. Render README requires a Personal Access token Document and style

    Runs on Pull requests when you comment with /document or /style use_github_action("render-readme.y aml") use_github_action("pr-commands.y aml") github.com/r-lib/actions
  48. None
  49. None
  50. Docker cont ainers Any docker hub cont ainer!

  51. Docker cont ainers Any docker hub cont ainer!

  52. Docker cont ainers Any docker hub cont ainer!

  53. Docker cont ainers Any docker hub cont ainer!

  54. github.com/r-lib/actions usethis::use_github_actions() speakerdeck.com/jimhester/github-actions-for-r @jimhester @maxheld83 GitHub Actions for  

    @jimhester_ @maxheld