Skip to content
Prev 6704 / 12125 Next

[R-pkg-devel] Two (newbie/luser) questions about adding CI to github hosted package

Hugely appreciated Duncan.

----- Original Message -----
OK.  I have removed the TEMPLATES directory and moved .lintr to the package root.

I think I am better keeping lintr local and having moved .lintr using

lintr::lint_package()

locally is working fine, flagging up cosmetics I can see are all improvements so I
can sort those out without wasting github power.  Which takes to the next stage ...
That is so appreciated Duncan. One stupid question: is there a way to run a
workflow other than by making an upload/push (or a pull request)?  

I think I have discovered that the workflows are controlled by the yaml files
in .github/workflows so I have deleted all except R-CMD-check.yaml and I think
that when I now commit and push this that should delete the other workflows 
on github and trigger this one to run.  If you could look at that one then
that would be hugely appreciated.  I see it says:

    strategy:
      fail-fast: false
      matrix:
        config:
          - {os: macOS-latest,   r: 'release'}
          - {os: windows-latest, r: 'release'}
          - {os: windows-latest, r: '3.6'}
          - {os: ubuntu-18.04,   r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
          - {os: ubuntu-18.04,   r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
          - {os: ubuntu-18.04,   r: 'oldrel',  rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
          - {os: ubuntu-18.04,   r: '3.5',     rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
          - {os: ubuntu-18.04,   r: '3.4',     rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
          - {os: ubuntu-18.04,   r: '3.3',     rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}


Some questions as I, I think, make some progress:

1) Why is windows-latest pointing at 3.6?  I am on 4.0.4 locally for windows.  I assume this is because I have copied or pulled in
a template that is out of date.  Can I just replace that '3.6' with 'release'

2) My guts say that at this point it is sensible for me to test against devel, release and oldrel but that after the next
release I could stop testing against oldrel?  Is that sensible?

3) I see tests against 3.3, 3.4 and 3.5 there for ubuntu 18.04 and no 20.04.  Am I correct that I could replace the above
with this:

    strategy:
      fail-fast: false
      matrix:
        config:
          - {os: macOS-latest,   r: 'release'}
          - {os: windows-latest, r: 'release'}
          - {os: windows-latest, r: 'release'}
          - {os: ubuntu-18.04,   r: 'devel', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest", http-user-agent: "R/4.0.0 (ubuntu-18.04) R (4.0.0 x86_64-pc-linux-gnu x86_64 linux-gnu) on GitHub Actions" }
          - {os: ubuntu-18.04,   r: 'release', rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
          - {os: ubuntu-18.04,   r: 'oldrel',  rspm: "https://packagemanager.rstudio.com/cran/__linux__/bionic/latest"}
          - {os: ubuntu-20.04,   r: 'devel',     rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
          - {os: ubuntu-20.04,   r: 'release',     rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}
          - {os: ubuntu-20.04,   r: 'oldrel',     rspm: "https://packagemanager.rstudio.com/cran/__linux__/xenial/latest"}

[I have changed the windows '3.6' to 'release' and the last three ubuntu calls to 20.04 and the R versions to 'devel', 'release'
 and 'oldrel' and the repositories to point at xenial not bionic.  I have only done this here in the Email, not on disc!]

It would be nice to check all that occasionally but I am sure that at the frequency I'm pushing up new functions and tweaks,
so my colleagues can check things, I am putting far too much work on github with all those.  Could I just check windows
and macOS release and devel by commenting out lines there.  Or is it better to have different yaml files and just to put
the one you want in .github/workflows for each particular push?  No great difference?

OK.  I have pushed these changes with the commit comment "More work to get continuous integration testing ..." and the
actions seem to be running and I seem to have succeeded in pruning things down to that one action.

Wonderful if you can find the time to have a look at these questions and the run ... now I'm off to the dentist.
Hm: dentist ... bad day with R ... dentist ... OK, I'll take bad day with R any day!

Thanks (and to all),

Chris