-
Notifications
You must be signed in to change notification settings - Fork 0
104 lines (89 loc) · 3.21 KB
/
Copy pathcopilot-setup-steps.yml
File metadata and controls
104 lines (89 loc) · 3.21 KB
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
# GitHub Copilot Setup Steps for qwt
#
# This workflow configures the GitHub Copilot coding agent's environment
# by preinstalling R, Quarto, TinyTeX, and system dependencies.
#
# See: https://docs.github.com/en/copilot/how-tos/use-copilot-agents/coding-agent/customize-the-agent-environment
#
# This workflow sets up:
# - Quarto CLI for rendering
# - TinyTeX for PDF output
name: "Copilot Setup Steps"
# Automatically run the setup steps when they are changed to allow for easy validation,
# and allow manual testing through the repository's "Actions" tab
on:
workflow_dispatch:
push:
paths:
- .github/workflows/copilot-setup-steps.yml
pull_request:
paths:
- .github/workflows/copilot-setup-steps.yml
jobs:
# The job MUST be called `copilot-setup-steps` or it will not be picked up by Copilot.
copilot-setup-steps:
runs-on: ubuntu-latest
# Set the permissions to the lowest permissions possible needed for your steps.
# Copilot will be given its own token for its operations.
permissions:
contents: read
# Timeout after 55 minutes (max is 59 for copilot-setup-steps)
timeout-minutes: 55
steps:
# Checkout code - Copilot will do this automatically if we don't,
# but we need it for any repository-specific setup
- name: Checkout code
uses: actions/checkout@v4
with:
submodules: true
# Install system dependencies required for R packages
- name: Install system dependencies
run: |
sudo apt-get update
sudo apt-get install -y \
libcurl4-openssl-dev \
libssl-dev \
libxml2-dev \
libfontconfig1-dev \
libharfbuzz-dev \
libfribidi-dev \
libfreetype6-dev \
libpng-dev \
libtiff5-dev \
libjpeg-dev
# Set up pandoc for documentation
- name: Set up Pandoc
uses: r-lib/actions/setup-pandoc@v2
# Set up R using the standard GitHub Actions setup
# Using 'release' to get the latest R version
- name: Set up R
uses: r-lib/actions/setup-r@v2
with:
r-version: '4.6'
use-public-rspm: true
# Install R packages needed for linting and Quarto rendering
- name: Install R packages
run: |
install.packages(
c("lintr", "rmarkdown"),
repos = "https://packagemanager.posit.co/cran/__linux__/noble/latest"
)
shell: Rscript {0}
# Set up Quarto - required for rendering the website
- name: Set up Quarto
uses: quarto-dev/quarto-actions/setup@v2
with:
tinytex: true
# Verify development environment is properly configured
- name: Verify development environment
run: |
echo "=== Development Environment Status ==="
# Check R installation
Rscript -e 'cat("R version:", R.version.string, "\n")'
# Verify Quarto is installed and working
echo ""
echo "=== Quarto Status ==="
quarto --version
quarto list tools
echo ""
echo "Development environment setup complete!"