Open alistaire47 opened 4 years ago
🙌 I also wonder what, if any, use the new GitHub actions can be to this end.
Some related resources:
@alistaire47 thanks for the @
. Love this idea! I have some examples that I've found useful. I'm hoping to work on #1 , but happy to drop some links on you! Sorry to everyone reading that a lot of these links are to things I've worked on...I'm not trying to self-promote, I promise. These may have my name on them but they're collections of things I learned from a lot of awesome people, including @jsal13 and @gkman and one other person I won't tag because he's on his honeymoon right now 😀
In general, I really really like the pattern of pushing CI logic into scripts in a folder like .ci/
, and then having .appveyor.yml
, .travis.yml
, Jenkinsfile
, etc. only be responsible for calling those scripts. I have lived that life of "managing dozens of lines of bash in YAML lists" and it is not one I recommend!
Here are a few such scripts that I've found valuable.
covr
to run your tests and failing in CI if coverage drops below some threshold
language: r
on Travis is a great way for projects to get started very fast with Travis, and I'm grateful to everyone who works to maintain it. But if you want more certainty that your jobs will run day to day, and you don't want to wait for things like the fixes rolled out after devtools 2.0.0
, this script works pretty well! It also is then easy to pick up and re-use in a docker container, or a random virtual machine from some other CI provider.lintr
lintr
projects, but personally disagree with Jim's guidance on how to use lintr in CI.lint_package()
does.pkgdown
docs. I would love to work on an Rmarkdown
converter for Sphinx so the R community could take advantages of readthedocs the way the Python community doesI still think there is value in breaking it down into small and basic operations. When Jim Hester, Craig Citro, and I wrote the first version of r-travis
it was all somewhat contingent on Travis CI's ruby framework. I preferred to get more plain shell script behavior out to not be beholden to a framework.
So these days I mostly build simple custom Docker containers based on Rocker and plug those in. I am still mostly with Travis, but by being based on Docker it should move easily to to Azure, GH Actions, GitLab, ... all of which can take Docker.
honestly I'm still not sure about the best way to manage hosting pkgdown docs. I would love to work on an Rmarkdown converter for Sphinx so the R community could take advantages of readthedocs the way the Python community does
I don't have any experience making Sphinx docs on my own and don't know how much control there is, but FWIW but I find pkgdown sites way easier to navigate than most Python packages' Sphinx docs.
FWIW but I find pkgdown sites way easier to navigate than most Python packages' Sphinx docs.
+1; I think the consistent structure of pkgdown plays a big role in its effectiveness.
I do think there's room to make it easier to nest pkgdown sites inside of larger sites, though. ROpenSci has an approach (as does updoc, for that matter), but navigating back and forth is pretty clunky; it'd be much nicer to have clearer top-level nav regardless of where you are.
Talking with @ataustin, we agreed that when it comes to CI (Travis, Appveyor, Jenkins, etc.), people (myself still included) tend to copy other people's code and treat it as magic incantations they want to work but not touch, because it'll probably break.
There are already tools like
usethis::use_travis()
to get people started, but it would be really useful to build some R-specific docs for how you can tweak your CI to do useful things (updating a pkgdown site, running R CMD check on multiple versions of R, rebuilding docs with roxygen, ???). Maybe a bookdown site with chapters contributed by anyone with ideas would be a logical format?I know a little on the subject, but I know at least @jameslamb and @angela-li (1) have done some cool CI stuff.