Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add R starter workflow #166

Merged
merged 5 commits into from
Aug 21, 2020
Merged

Conversation

jimhester
Copy link
Contributor

This adds a workflow for R packages. It uses a setup-r action and two R packages

  • remotes - to install the R package dependencies
  • rcmdcheck - to run and format the output of the package checking tool used in the R ecosystem.
Contributing checklist Thank you for sending in this pull request. Please make sure you take a look at the [contributing file](CONTRIBUTING.md). Here's a few things for you to consider in this pull request:
  • Include a good description of the workflow.
  • Links to the language or tool will be nice (unless its really obvious)

In the workflow and properties files:

  • Includes a matching ci/properties/*.properties.json file.
  • Use title case for the names of workflows and steps, for example "Run tests".
  • The name of CI workflows should only be the name of the language or platform: for example "Go" (not "Go CI" or "Go Build")
  • Include comments in the workflow for any parts that are not obvious or could use clarification.
  • CI workflows should run push.
  • Packaging workflows should run on release with types: [created].

Some general notes:

  • Does not use an Action that isn't in the actions organization.
  • Does not send data to any 3rd party service except for the purposes of installing dependencies.
  • Does not use a paid service or product.

The action used (setup-r) is not currently part of the actions organization. I have written a few actions often needed for R packages at https://github.com/r-lib/actions/, which is where this setup-r action currently lives.

I also added a svg of the R logo, but did not try to resize it to correspond with the existing logo sizes.

This adds a workflow for [R packages](https://www.r-project.org/). It
uses a [setup-r](https://github.com/r-lib/actions/tree/master/setup-r) action and two R packages
  - [remotes](https://remotes.r-lib.org/) - to install the R package dependencies
  - [rcmdcheck](https://github.com/r-lib/rcmdcheck) - to run and format the output of the package checking tool used in the R ecosystem.
Copy link
Contributor

@andymckay andymckay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thank you @jimhester. Unfortunately as mentioned in the contributing guidelines we can't accept starter workflows that use Actions outside of the actions org and this uses rlib/actions/setup-r.

Your next question then is probably "how can we get R added to the actions" and I'm not sure on the answer to that right now.

So sorry, there might be some work to figure out what to do with this workflow. Thank you 🙇 for your contribution and we'll try and get there.

@jimhester jimhester mentioned this pull request Nov 5, 2019
@jimhester
Copy link
Contributor Author

Yes, I figured as much, in the meantime I will point the R community to my collection of actions in the r-lib organization, and if in the future we can change r-lib/actions/setup-r to actions/setup-r, great!

If not I think that is OK as well.

@nealrichardson
Copy link

@chrispat great chatting with you today at GitHub Universe. Looking forward to seeing if we can find an owner for R within GitHub so we can move this forward.

@ethomson
Copy link
Contributor

👋 Hi @jimhester - sorry about the delay here. We've changed the requirements a bit here, and we're now able to support starter workflow templates that use third-party actions.

In particular:

This workflow must only use actions that are produced by GitHub, in the actions organization, or

This workflow must only use actions that are produced by the language or ecosystem that the workflow supports. These actions must be published to the GitHub Marketplace. Workflows using these actions must reference the action using the full 40 character hash of the action's commit instead of a tag. Additionally, workflows must include the following comment at the top of the workflow file:

This workflow uses actions that are not certified by GitHub.
They are provided by a third-party and are governed by
separate terms of service, privacy policy, and support
documentation.

In addition - we've updated the checkout action since you created this PR. Could you update it to actions/checkout@v2?

Finally, we've changed the triggers that we use by default for CI templates. Could you update the triggers to be:

on:
  push:
    branches: [ master ]
  pull_request:
    branches: [ master ]

Thanks so much!

@jimhester
Copy link
Contributor Author

@ethomson I tweaked the workflow as suggested, adding the comment, changing the triggers, pinning the commit for the setup-r action and bumping the checkout version to v2.

I also added a link in the comment to where users can find more workflow examples for R packages, hope that is OK.

Let me know if there is anything else you might need, thanks for circling back to this!

Copy link
Contributor

@andymckay andymckay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Could I check what license the R logo is under please? This repo is under an MIT License https://github.com/actions/starter-workflows/blob/main/LICENSE. The website https://www.r-project.org/Licenses/ didn't mention anything about the logo and we want to make sure that's all cool.

ci/r.yml Outdated Show resolved Hide resolved

jobs:
build:
runs-on: macOS-latest
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I'm curious that its running macOS-latest, could this run on ubuntu-latest instead? The cost for a user of running on MacOS is significantly higher than running on Ubuntu, so we'd like to default to that if we can to prevent any surprises.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

It could use ubuntu-latest.

The main advantage to using macOS for R is CRAN provides pre-compiled binaries for R packages on macOS, something they do not do for linux. So building dependencies will take more time.

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The RStudio Package Manager does provide R package binaries on linux, and we have example workflows which use that, e.g. (https://github.com/r-lib/actions/blob/master/examples/check-standard.yaml#L25-L30).

However I was trying to keep this workflow as basic as we could.

Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Alright, if this is the simplest way to go, let's do that. Thanks!

Co-authored-by: Andy McKay <andymckay@github.com>
@jimhester
Copy link
Contributor Author

The logo is under CC-BY-SA 4.0 (https://www.r-project.org/logo/)

Copy link
Contributor

@andymckay andymckay left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I made a quick change to fix the case sensitivity of the icon.

@andymckay andymckay merged commit e671540 into actions:master Aug 21, 2020
@andymckay
Copy link
Contributor

@jimhester 🙇🏾 thank you so much for this and your patience.

andymckay pushed a commit that referenced this pull request Aug 21, 2020
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

None yet

4 participants