Skip to content

Commit 2082f72

Browse files
committed
chore: add Copilot Coding Agent setup steps
Universal environment setup for Copilot's coding agent. Configures Node.js 22, Python 3.12, and Go (stable). Docs: https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent
1 parent 02f50e6 commit 2082f72

1 file changed

Lines changed: 55 additions & 0 deletions

File tree

Lines changed: 55 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,55 @@
1+
# Copilot Coding Agent — Environment Setup
2+
# This workflow configures the development environment for Copilot's coding agent.
3+
# It runs automatically when Copilot starts a coding session.
4+
# Docs: https://docs.github.com/en/copilot/customizing-copilot/customizing-the-development-environment-for-copilot-coding-agent
5+
6+
name: "Copilot Setup Steps"
7+
8+
on: workflow_dispatch
9+
10+
jobs:
11+
setup:
12+
runs-on: ubuntu-latest
13+
permissions:
14+
contents: read
15+
steps:
16+
- name: Checkout repository
17+
uses: actions/checkout@v4
18+
19+
# ── Node.js (JavaScript/TypeScript) ──
20+
- name: Setup Node.js
21+
uses: actions/setup-node@v4
22+
with:
23+
node-version: "22"
24+
25+
- name: Install npm dependencies
26+
run: |
27+
if [ -f package-lock.json ] || [ -f package.json ]; then
28+
npm ci --ignore-scripts 2>/dev/null || npm install --ignore-scripts 2>/dev/null || true
29+
fi
30+
31+
# ── Python ──
32+
- name: Setup Python
33+
uses: actions/setup-python@v5
34+
with:
35+
python-version: "3.12"
36+
37+
- name: Install Python dependencies
38+
run: |
39+
if [ -f requirements.txt ]; then
40+
pip install -r requirements.txt 2>/dev/null || true
41+
elif [ -f pyproject.toml ]; then
42+
pip install -e ".[dev]" 2>/dev/null || pip install -e . 2>/dev/null || true
43+
fi
44+
45+
# ── Go ──
46+
- name: Setup Go
47+
uses: actions/setup-go@v5
48+
with:
49+
go-version: "stable"
50+
51+
- name: Install Go modules
52+
run: |
53+
if [ -f go.mod ]; then
54+
go mod download 2>/dev/null || true
55+
fi

0 commit comments

Comments
 (0)