Skip to content

Commit a853904

Browse files
authored
Add Copilot setup workflow for R package development (#233)
2 parents 81659f0 + c3e4507 commit a853904

File tree

1 file changed

+67
-0
lines changed

1 file changed

+67
-0
lines changed
Lines changed: 67 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,67 @@
1+
name: "Copilot Setup Steps"
2+
3+
# Automatically run the setup steps when they are changed to allow for easy validation, and
4+
# allow manual testing through the repository's "Actions" tab
5+
on:
6+
workflow_dispatch:
7+
push:
8+
paths:
9+
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
13+
14+
jobs:
15+
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
16+
copilot-setup-steps:
17+
runs-on: ubuntu-latest
18+
19+
# Set the permissions to the lowest permissions possible needed for your steps.
20+
# Copilot will be given its own token for its operations.
21+
permissions:
22+
# If you want to clone the repository as part of your setup steps, for example to install dependencies, you'll need the `contents: read` permission. If you don't clone the repository in your setup steps, Copilot will do this for you automatically after the steps complete.
23+
contents: read
24+
25+
# Environment variables for R package development
26+
env:
27+
_R_CHECK_CRAN_INCOMING_: true
28+
_R_CHECK_FORCE_SUGGESTS_: false
29+
R_COMPILE_AND_INSTALL_PACKAGES: 'never'
30+
_R_CHECK_THINGS_IN_CHECK_DIR_: false
31+
R_REMOTES_STANDALONE: true
32+
R_REMOTES_NO_ERRORS_FROM_WARNINGS: true
33+
R_REALLY_FORCE_SYMBOLS: true
34+
_R_CHECK_CRAN_INCOMING_USE_ASPELL_: false
35+
RSPM: "https://packagemanager.rstudio.com/cran/__linux__/noble/latest"
36+
GITHUB_PAT: ${{ secrets.GITHUB_TOKEN }}
37+
38+
# You can define any steps you want, and they will run before the agent starts.
39+
# If you do not check out your code, Copilot will do this for you.
40+
steps:
41+
- name: Checkout code
42+
uses: actions/checkout@v5
43+
44+
- name: Set up R
45+
uses: r-lib/actions/setup-r@v2
46+
with:
47+
r-version: "release"
48+
49+
- name: Install apt packages
50+
run: |
51+
sudo apt-get update
52+
sudo apt-get install -y texlive-latex-base texlive-fonts-recommended
53+
54+
- name: Set up R dependencies
55+
uses: r-lib/actions/setup-r-dependencies@v2
56+
with:
57+
pandoc-version: "latest"
58+
needs: |
59+
check
60+
coverage
61+
extra-packages: |
62+
any::devtools
63+
any::testthat
64+
any::roxygen2
65+
any::lintr
66+
any::rcmdcheck
67+
phangorn=?ignore-before-r=4.1.0

0 commit comments

Comments
 (0)