Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
4 changes: 4 additions & 0 deletions .github/actions/setup-copilot/action.yml
Original file line number Diff line number Diff line change
@@ -1,5 +1,9 @@
name: "Setup Copilot"
description: "Setup Copilot based on the project's package.json file."
outputs:
cli-path:
description: "Path to the Copilot CLI"
value: ${{ steps.cli-path.outputs.path }}
runs:
using: "composite"
steps:
Expand Down
73 changes: 73 additions & 0 deletions .github/workflows/dotnet-sdk-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,73 @@
name: ".NET SDK Tests"

on:
pull_request:
paths:
- 'dotnet/**'
- 'test/**'
- 'nodejs/package.json'
- '.github/workflows/dotnet-sdk-tests.yml'
- '.github/actions/setup-copilot/**'
workflow_dispatch:
merge_group:

permissions:
contents: read

jobs:
test:
name: ".NET SDK Tests"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: ./dotnet
steps:
- uses: actions/checkout@v6.0.2
- uses: ./.github/actions/setup-copilot
id: setup-copilot
- uses: actions/setup-dotnet@v5
with:
dotnet-version: "8.0.x"
- uses: actions/setup-node@v6
with:
cache: "npm"
cache-dependency-path: "./nodejs/package-lock.json"

- name: Install Node.js dependencies (for CLI)
working-directory: ./nodejs
run: npm ci --ignore-scripts

- name: Restore .NET dependencies
run: dotnet restore

- name: Run dotnet format check
if: runner.os == 'Linux'
run: |
dotnet format --verify-no-changes
if [ $? -ne 0 ]; then
echo "❌ dotnet format produced changes. Please run 'dotnet format' in dotnet"
exit 1
fi
echo "✅ dotnet format produced no changes"

- name: Build SDK
run: dotnet build --no-restore

- name: Install test harness dependencies
working-directory: ./test/harness
run: npm ci --ignore-scripts

- name: Warm up PowerShell
if: runner.os == 'Windows'
run: pwsh.exe -Command "Write-Host 'PowerShell ready'"

- name: Run .NET SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
run: dotnet test --no-build -v n
69 changes: 69 additions & 0 deletions .github/workflows/go-sdk-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: "Go SDK Tests"

on:
pull_request:
paths:
- 'go/**'
- 'test/**'
- 'nodejs/package.json'
- '.github/workflows/go-sdk-tests.yml'
- '.github/actions/setup-copilot/**'
workflow_dispatch:
merge_group:

permissions:
contents: read

jobs:
test:
name: "Go SDK Tests"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: ./go
steps:
- uses: actions/checkout@v6.0.2
- uses: ./.github/actions/setup-copilot
id: setup-copilot
- uses: actions/setup-go@v6
with:
go-version: "1.23"

- name: Run go fmt
if: runner.os == 'Linux'
working-directory: ./go
run: |
go fmt ./...
if [ -n "$(git status --porcelain)" ]; then
echo "❌ go fmt produced changes. Please run 'go fmt ./...' in go"
git --no-pager diff
exit 1
fi
echo "✅ go fmt produced no changes"

- name: Install golangci-lint
if: runner.os == 'Linux'
uses: golangci/golangci-lint-action@v9
with:
working-directory: ./go
version: latest
args: --timeout=5m

- name: Install test harness dependencies
working-directory: ./test/harness
run: npm ci --ignore-scripts

- name: Warm up PowerShell
if: runner.os == 'Windows'
run: pwsh.exe -Command "Write-Host 'PowerShell ready'"

- name: Run Go SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
run: /bin/bash test.sh
65 changes: 65 additions & 0 deletions .github/workflows/nodejs-sdk-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,65 @@
name: "Node.js SDK Tests"

env:
HUSKY: 0

on:
pull_request:
paths:
- 'nodejs/**'
- 'test/**'
- '.github/workflows/nodejs-sdk-tests.yml'
- '.github/actions/setup-copilot/**'
workflow_dispatch:
merge_group:

permissions:
contents: read

jobs:
test:
name: "Node.js SDK Tests"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: ./nodejs
steps:
- uses: actions/checkout@v6.0.2
- uses: actions/setup-node@v6
with:
cache: "npm"
cache-dependency-path: "./nodejs/package-lock.json"
node-version: 22
- uses: ./.github/actions/setup-copilot
id: setup-copilot
- name: Install dependencies
run: npm ci --ignore-scripts

- name: Run prettier check
if: runner.os == 'Linux'
run: npm run format:check

- name: Run ESLint
run: npm run lint

- name: Typecheck SDK
run: npm run typecheck

- name: Install test harness dependencies
working-directory: ./test/harness
run: npm ci --ignore-scripts

- name: Warm up PowerShell
if: runner.os == 'Windows'
run: pwsh.exe -Command "Write-Host 'PowerShell ready'"

- name: Run Node.js SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
run: npm test
69 changes: 69 additions & 0 deletions .github/workflows/python-sdk-tests.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: "Python SDK Tests"

env:
PYTHONUTF8: 1

on:
pull_request:
paths:
- 'python/**'
- 'test/**'
- 'nodejs/package.json'
- '.github/workflows/python-sdk-tests.yml'
- '.github/actions/setup-copilot/**'
workflow_dispatch:
merge_group:

permissions:
contents: read

jobs:
test:
name: "Python SDK Tests"
strategy:
fail-fast: false
matrix:
os: [ubuntu-latest, macos-latest, windows-latest]
runs-on: ${{ matrix.os }}
defaults:
run:
shell: bash
working-directory: ./python
steps:
- uses: actions/checkout@v6.0.2
- uses: ./.github/actions/setup-copilot
id: setup-copilot
- uses: actions/setup-python@v6
with:
python-version: "3.12"

- name: Set up uv
uses: astral-sh/setup-uv@v7
with:
enable-cache: true

- name: Install Python dev dependencies
run: uv sync --locked --all-extras --dev

- name: Run ruff format check
run: uv run ruff format --check .

- name: Run ruff lint
run: uv run ruff check

- name: Run ty type checking
run: uv run ty check copilot

- name: Install test harness dependencies
working-directory: ./test/harness
run: npm ci --ignore-scripts

- name: Warm up PowerShell
if: runner.os == 'Windows'
run: pwsh.exe -Command "Write-Host 'PowerShell ready'"

- name: Run Python SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
run: uv run pytest -v -s
Loading
Loading