Skip to content

Commit 539dddc

Browse files
authored
Merge remote-tracking branch 'origin/main' into frg/additional-options
2 parents 7308629 + 2fe7352 commit 539dddc

21 files changed

Lines changed: 975 additions & 335 deletions

.github/actions/setup-copilot/action.yml

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -1,5 +1,9 @@
11
name: "Setup Copilot"
22
description: "Setup Copilot based on the project's package.json file."
3+
outputs:
4+
cli-path:
5+
description: "Path to the Copilot CLI"
6+
value: ${{ steps.cli-path.outputs.path }}
37
runs:
48
using: "composite"
59
steps:

.github/workflows/copilot-setup-steps.yml

Lines changed: 88 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,11 +1,15 @@
11
name: "Copilot Setup Steps"
22

3-
# This workflow configures the environment for GitHub Copilot Agent with gh-aw MCP server
3+
# This workflow configures the environment for GitHub Copilot Agent
4+
# Automatically run the setup steps when they are changed to allow for easy validation
45
on:
56
workflow_dispatch:
67
push:
78
paths:
89
- .github/workflows/copilot-setup-steps.yml
10+
pull_request:
11+
paths:
12+
- .github/workflows/copilot-setup-steps.yml
913

1014
jobs:
1115
# The job MUST be called 'copilot-setup-steps' to be recognized by GitHub Copilot Agent
@@ -18,8 +22,89 @@ jobs:
1822
contents: read
1923

2024
steps:
25+
# Checkout the repository to install dependencies
26+
- name: Checkout code
27+
uses: actions/checkout@v6.0.2
28+
29+
# Setup Node.js (for TypeScript/JavaScript SDK and tooling)
30+
- name: Set up Node.js
31+
uses: actions/setup-node@v6
32+
with:
33+
node-version: "22"
34+
cache: "npm"
35+
cache-dependency-path: |
36+
./nodejs/package-lock.json
37+
./test/harness/package-lock.json
38+
39+
# Setup Python (for Python SDK)
40+
- name: Set up Python
41+
uses: actions/setup-python@v6
42+
with:
43+
python-version: "3.12"
44+
45+
# Setup uv (Python package manager used in this repo)
46+
- name: Set up uv
47+
uses: astral-sh/setup-uv@v7
48+
with:
49+
enable-cache: true
50+
51+
# Setup Go (for Go SDK)
52+
- name: Set up Go
53+
uses: actions/setup-go@v6
54+
with:
55+
go-version: "1.23"
56+
57+
# Setup .NET (for .NET SDK)
58+
- name: Set up .NET
59+
uses: actions/setup-dotnet@v5
60+
with:
61+
dotnet-version: "8.0.x"
62+
63+
# Install just command runner
64+
- name: Install just
65+
uses: extractions/setup-just@v3
66+
67+
# Install gh-aw extension for advanced GitHub CLI features
2168
- name: Install gh-aw extension
2269
run: |
2370
curl -fsSL https://raw.githubusercontent.com/githubnext/gh-aw/refs/heads/main/install-gh-aw.sh | bash
24-
- name: Verify gh-aw installation
25-
run: gh aw version
71+
72+
# Install JavaScript dependencies
73+
- name: Install Node.js dependencies
74+
working-directory: ./nodejs
75+
run: npm ci --ignore-scripts
76+
77+
# Install Python dependencies
78+
- name: Install Python dependencies
79+
working-directory: ./python
80+
run: uv sync --locked --all-extras --dev
81+
82+
# Install Go dependencies
83+
- name: Install Go dependencies
84+
working-directory: ./go
85+
run: go mod download
86+
87+
# Restore .NET dependencies
88+
- name: Restore .NET dependencies
89+
working-directory: ./dotnet
90+
run: dotnet restore
91+
92+
# Install test harness dependencies
93+
- name: Install test harness dependencies
94+
working-directory: ./test/harness
95+
run: npm ci --ignore-scripts
96+
97+
# Verify installations
98+
- name: Verify tool installations
99+
run: |
100+
echo "=== Verifying installations ==="
101+
node --version
102+
npm --version
103+
python --version
104+
uv --version
105+
go version
106+
dotnet --version
107+
just --version
108+
gh --version
109+
gh aw version
110+
echo "✅ All tools installed successfully"
Lines changed: 73 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,73 @@
1+
name: ".NET SDK Tests"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'dotnet/**'
7+
- 'test/**'
8+
- 'nodejs/package.json'
9+
- '.github/workflows/dotnet-sdk-tests.yml'
10+
- '.github/actions/setup-copilot/**'
11+
workflow_dispatch:
12+
merge_group:
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
test:
19+
name: ".NET SDK Tests"
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os: [ubuntu-latest, macos-latest, windows-latest]
24+
runs-on: ${{ matrix.os }}
25+
defaults:
26+
run:
27+
shell: bash
28+
working-directory: ./dotnet
29+
steps:
30+
- uses: actions/checkout@v6.0.2
31+
- uses: ./.github/actions/setup-copilot
32+
id: setup-copilot
33+
- uses: actions/setup-dotnet@v5
34+
with:
35+
dotnet-version: "8.0.x"
36+
- uses: actions/setup-node@v6
37+
with:
38+
cache: "npm"
39+
cache-dependency-path: "./nodejs/package-lock.json"
40+
41+
- name: Install Node.js dependencies (for CLI)
42+
working-directory: ./nodejs
43+
run: npm ci --ignore-scripts
44+
45+
- name: Restore .NET dependencies
46+
run: dotnet restore
47+
48+
- name: Run dotnet format check
49+
if: runner.os == 'Linux'
50+
run: |
51+
dotnet format --verify-no-changes
52+
if [ $? -ne 0 ]; then
53+
echo "❌ dotnet format produced changes. Please run 'dotnet format' in dotnet"
54+
exit 1
55+
fi
56+
echo "✅ dotnet format produced no changes"
57+
58+
- name: Build SDK
59+
run: dotnet build --no-restore
60+
61+
- name: Install test harness dependencies
62+
working-directory: ./test/harness
63+
run: npm ci --ignore-scripts
64+
65+
- name: Warm up PowerShell
66+
if: runner.os == 'Windows'
67+
run: pwsh.exe -Command "Write-Host 'PowerShell ready'"
68+
69+
- name: Run .NET SDK tests
70+
env:
71+
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
72+
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
73+
run: dotnet test --no-build -v n

.github/workflows/go-sdk-tests.yml

Lines changed: 69 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,69 @@
1+
name: "Go SDK Tests"
2+
3+
on:
4+
pull_request:
5+
paths:
6+
- 'go/**'
7+
- 'test/**'
8+
- 'nodejs/package.json'
9+
- '.github/workflows/go-sdk-tests.yml'
10+
- '.github/actions/setup-copilot/**'
11+
workflow_dispatch:
12+
merge_group:
13+
14+
permissions:
15+
contents: read
16+
17+
jobs:
18+
test:
19+
name: "Go SDK Tests"
20+
strategy:
21+
fail-fast: false
22+
matrix:
23+
os: [ubuntu-latest, macos-latest, windows-latest]
24+
runs-on: ${{ matrix.os }}
25+
defaults:
26+
run:
27+
shell: bash
28+
working-directory: ./go
29+
steps:
30+
- uses: actions/checkout@v6.0.2
31+
- uses: ./.github/actions/setup-copilot
32+
id: setup-copilot
33+
- uses: actions/setup-go@v6
34+
with:
35+
go-version: "1.23"
36+
37+
- name: Run go fmt
38+
if: runner.os == 'Linux'
39+
working-directory: ./go
40+
run: |
41+
go fmt ./...
42+
if [ -n "$(git status --porcelain)" ]; then
43+
echo "❌ go fmt produced changes. Please run 'go fmt ./...' in go"
44+
git --no-pager diff
45+
exit 1
46+
fi
47+
echo "✅ go fmt produced no changes"
48+
49+
- name: Install golangci-lint
50+
if: runner.os == 'Linux'
51+
uses: golangci/golangci-lint-action@v9
52+
with:
53+
working-directory: ./go
54+
version: latest
55+
args: --timeout=5m
56+
57+
- name: Install test harness dependencies
58+
working-directory: ./test/harness
59+
run: npm ci --ignore-scripts
60+
61+
- name: Warm up PowerShell
62+
if: runner.os == 'Windows'
63+
run: pwsh.exe -Command "Write-Host 'PowerShell ready'"
64+
65+
- name: Run Go SDK tests
66+
env:
67+
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
68+
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
69+
run: /bin/bash test.sh

.github/workflows/issue-triage.lock.yml

Lines changed: 5 additions & 5 deletions
Some generated files are not rendered by default. Learn more about customizing how changed files appear on GitHub.
Lines changed: 65 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,65 @@
1+
name: "Node.js SDK Tests"
2+
3+
env:
4+
HUSKY: 0
5+
6+
on:
7+
pull_request:
8+
paths:
9+
- 'nodejs/**'
10+
- 'test/**'
11+
- '.github/workflows/nodejs-sdk-tests.yml'
12+
- '.github/actions/setup-copilot/**'
13+
workflow_dispatch:
14+
merge_group:
15+
16+
permissions:
17+
contents: read
18+
19+
jobs:
20+
test:
21+
name: "Node.js SDK Tests"
22+
strategy:
23+
fail-fast: false
24+
matrix:
25+
os: [ubuntu-latest, macos-latest, windows-latest]
26+
runs-on: ${{ matrix.os }}
27+
defaults:
28+
run:
29+
shell: bash
30+
working-directory: ./nodejs
31+
steps:
32+
- uses: actions/checkout@v6.0.2
33+
- uses: actions/setup-node@v6
34+
with:
35+
cache: "npm"
36+
cache-dependency-path: "./nodejs/package-lock.json"
37+
node-version: 22
38+
- uses: ./.github/actions/setup-copilot
39+
id: setup-copilot
40+
- name: Install dependencies
41+
run: npm ci --ignore-scripts
42+
43+
- name: Run prettier check
44+
if: runner.os == 'Linux'
45+
run: npm run format:check
46+
47+
- name: Run ESLint
48+
run: npm run lint
49+
50+
- name: Typecheck SDK
51+
run: npm run typecheck
52+
53+
- name: Install test harness dependencies
54+
working-directory: ./test/harness
55+
run: npm ci --ignore-scripts
56+
57+
- name: Warm up PowerShell
58+
if: runner.os == 'Windows'
59+
run: pwsh.exe -Command "Write-Host 'PowerShell ready'"
60+
61+
- name: Run Node.js SDK tests
62+
env:
63+
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
64+
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
65+
run: npm test

0 commit comments

Comments
 (0)