yonicd / covrpage

Create a summary readme for the testthat subdirectory to communicate with potential users
https://yonicd.github.io/covrpage/
Other
52 stars 7 forks source link

add `tic` as an option for templating travis.yml files #28

Closed yonicd closed 6 years ago

yonicd commented 6 years ago

add to use_covrpage and option to build a tic.R file and a travis.yml that has tic dependency.

maelle commented 6 years ago

it would be more than that, I'm wondering whether it could "just" take over the current use_covrpage(), because travis::use_tic() also helps with:

So there could be

yonicd commented 6 years ago

GITHUB_PAT is great for GITHUB repos, but users are also using GHE, which needs a different PAT, how does tic handle that?

maelle commented 6 years ago

@krlmlr does tic handle GitHub Enterprise? I don't think so?

krlmlr commented 6 years ago

I have never tried. But since tic can execute arbitrary R code, I'm confident a solution can be worked out with add_code_step(), and maybe later integrated if necessary.

yonicd commented 6 years ago

does tic have a way to encrypt a local environmental variable for appveyor? the ghe token is different than the gh token.

krlmlr commented 6 years ago

Have you seen https://www.appveyor.com/docs/build-configuration/#secure-variables? Currently we don't have a way to do this automatically.

yonicd commented 6 years ago

Yes. I did that for a repo once, was wondering if it’s possible in tic somehow. Thanks for the link.

maelle commented 6 years ago

What I did to get covrpage README and vignette deploying for pRojects (not fully there yet...)

and

  if (ci()$get_branch() == "master") {
  get_stage("deploy") %>%
    add_step(step_push_deploy(commit_paths = "tests/README.md")) %>%
    add_step(step_build_pkgdown()) %>%
    add_step(step_push_deploy(path = "docs", branch = "gh-pages"))
  }else{
    get_stage("deploy") %>%
      add_step(step_push_deploy(commit_paths = "tests/README.md"))

  }

instead of just the pkgdown usual stuff. It doesn't work yet because "tests/README.md" is staged, there's nothing to commit, then there's a message saying it was modified but not staged. I'm a bit lost at the moment.

maelle commented 6 years ago

I'm not sure how this should be documented in covrpage when it works.

maelle commented 6 years ago

Now it works see https://github.com/lockedata/pRojects/blob/master/tic.R

yonicd commented 6 years ago

I tried to set it up using this branch. I am still confused on how to use tic. Currently it is still not deploying.

maelle commented 6 years ago

is it deploying now?

and if it is, what's your view now on a re-factoring of use_covrpage?

yonicd commented 6 years ago

It is deploying now. I think that I'll keep it as an option and not as the default. so users can choose their comfort zone yml/tic/bash

maelle commented 6 years ago

I'll let you handle this, then? Seems easier given how well you know use_covrpage() 😉

yonicd commented 6 years ago

added use_tic in use_covrpage. @maelle do the steps in use_tic make sense?

maelle commented 6 years ago

It looks good!

yonicd commented 6 years ago

https://github.com/yonicd/covrpage/commit/2c97fc10e128282a23292e47ff4be29a6c2fc818