Skip to content

ci: add copilot setup workflow and componentize install steps#17

Merged
jonthegeek merged 7 commits into
mainfrom
copilot/adapt-copilot-setup-workflow
Mar 10, 2026
Merged

ci: add copilot setup workflow and componentize install steps#17
jonthegeek merged 7 commits into
mainfrom
copilot/adapt-copilot-setup-workflow

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Mar 9, 2026

Introduces a shared composite action for R environment setup and adds a copilot-setup-steps workflow required for GitHub Copilot agent support. All existing workflows now delegate the pandoc/R/dependency installation sequence to the shared action.

New files

  • .github/workflows/install/action.yml — composite action wrapping setup-pandoc, setup-r, and setup-r-dependencies with inputs for r-version, http-user-agent, needs, extra-packages, and cache-version
  • .github/workflows/copilot-setup-steps.yml — Copilot agent setup workflow (job name is required to be copilot-setup-steps); installs full dev environment + air

Updated workflows

All four existing workflows replace their inline setup steps with a single uses: ./.github/workflows/install call:

- uses: ./.github/workflows/install
  with:
    token: ${{ secrets.GITHUB_TOKEN }}
    needs: check
    extra-packages: any::rcmdcheck
  • R-CMD-check.yaml — passes r-version and http-user-agent from the matrix
  • pkgdown.yamlneeds: website, extra-packages: any::pkgdown local::.
  • test-coverage.yamlneeds: coverage, extra-packages: any::covr
  • pr-commands.yaml/document job uses the install action; /style job drops styler in favour of posit-dev/setup-air + air format .
Original prompt

This section details on the original issue you should resolve

<issue_title>ci: include copilot setup workflow</issue_title>
<issue_description>Adapt https://raw.githubusercontent.com/Gilead-BioStats/qcthat/refs/heads/dev/.github/workflows/copilot-setup-steps.yml to a datawrap-specific workflow. We'll also need to implement the equivalent of https://raw.githubusercontent.com/Gilead-BioStats/qcthat/refs/heads/dev/.github/workflows/install/action.yml

That setup was inspired by https://github.com/r-lib/pillar/tree/main/.github/workflows , which I thought was a new standard for the r-lib org (and a model for how to build better workflows), but I'm not seeing widespread adoption of that setup even within r-lib. Evaluate whether the component-based workflows make sense. I like the idea, and would prefer to break things down this way if it's a good idea.

If it does make sense, update the other workflows in this repository to share component steps. For example, .github/workflows/R-CMD-check.yaml should also use .github/workflows/install/, similar to how https://raw.githubusercontent.com/r-lib/pillar/refs/heads/main/.github/workflows/R-CMD-check.yaml does. Also see https://raw.githubusercontent.com/r-lib/pillar/refs/heads/main/.github/workflows/pkgdown.yaml and https://raw.githubusercontent.com/r-lib/pillar/refs/heads/main/.github/workflows/pr-commands.yaml for component-ized examples of standard workflows.</issue_description>

<agent_instructions>Break off reused portions of workflows as shown with workflows/install. Use r-lib/pillar as the main model for the "right" way to break down workflows.</agent_instructions>

Comments on the Issue (you are @copilot in this section)


💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.

- Add .github/workflows/install/action.yml composite action for shared
  R/pandoc/dependency setup
- Add .github/workflows/copilot-setup-steps.yml for GitHub Copilot agent
- Update R-CMD-check, pkgdown, test-coverage, pr-commands to use install action
- Switch /style pr-command from styler to air format

- Closes #15

Co-authored-by: jonthegeek <33983824+jonthegeek@users.noreply.github.com>
Copilot AI changed the title [WIP] Adapt Copilot setup workflow for DataWrap ci: add copilot setup workflow and componentize install steps Mar 9, 2026
@jonthegeek jonthegeek marked this pull request as ready for review March 10, 2026 12:28
Copilot AI review requested due to automatic review settings March 10, 2026 12:28
@jonthegeek jonthegeek enabled auto-merge (squash) March 10, 2026 12:29
@jonthegeek jonthegeek merged commit 1d2d9a1 into main Mar 10, 2026
11 checks passed
@jonthegeek jonthegeek deleted the copilot/adapt-copilot-setup-workflow branch March 10, 2026 12:30
Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

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

Pull request overview

This PR introduces a reusable composite action to standardize R/pandoc/dependency setup across CI workflows, and adds the required copilot-setup-steps workflow for GitHub Copilot agent support.

Changes:

  • Added a shared composite action (.github/workflows/install) wrapping setup-pandoc, setup-r, and setup-r-dependencies.
  • Added a copilot-setup-steps workflow that provisions a full dev environment (plus air).
  • Refactored existing workflows to use the shared install action; updated coverage reporting to generate Cobertura output and upload via Codecov action.

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 2 comments.

Show a summary per file
File Description
.github/workflows/install/action.yml New composite action to centralize R/pandoc/dependency installation.
.github/workflows/copilot-setup-steps.yml New workflow to prepare the repo environment for Copilot agent runs.
.github/workflows/R-CMD-check.yaml Uses the composite install action instead of inline setup steps.
.github/workflows/pkgdown.yaml Uses the composite install action for site builds.
.github/workflows/pr-commands.yaml /document uses composite install; /style switches from styler to air.
.github/workflows/test-coverage.yaml Uses composite install and switches to Cobertura + Codecov action upload.

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread .github/workflows/test-coverage.yaml
Comment thread .github/workflows/test-coverage.yaml
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.

ci: include copilot setup workflow

3 participants