Skip to content

Assist with GHA setup around Air #2137

@jennybc

Description

@jennybc

What do we want to do around GitHub Actions and Air?

https://posit-dev.github.io/air/integration-github-actions.html

Two workflows already exist and can be placed like so:

usethis::use_github_action(url = "https://github.com/posit-dev/setup-air/blob/main/examples/format-suggest.yaml")
usethis::use_github_action(url = "https://github.com/posit-dev/setup-air/blob/main/examples/format-check.yaml")
  • format-suggest.yaml: "This action runs air format . on every pull request. If formatting is required, the check fails and suggestion comments are added directly to the pull request."
  • format-check.yaml: "This runs air format . --check on every push to main and on every pull request. This is a very simple action that fails if any files would be reformatted."

I don't think we want to place these with use_air(), since that is usually just the opening move for adopting Air. You would not want these actions in place until the reformatting was complete.

Discussion points:

  • We could message about adding GHA in use_air() and could give the code snippet above re: how to place the actions later in the use_air() docs.
  • I feel like there are some implications for r-lib/actions. For example, it certainly feels nicer/easier to place workflows that live there. Would we want to copy the Air actions to r-lib/actions? Also, what are the implications for /style as currently defined examples/pr-commands.yaml. Note that we currently place/update this workflow in use_tidy_github_actions() and it's one of the few we offer in use_github_action(), so it's sort of "official".

Metadata

Metadata

Assignees

No one assigned

    Labels

    gitgit, GitHub, and CI in generaltidy ✨tools for the tidyverse team

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions