Skip to content
Merged
Show file tree
Hide file tree
Changes from 6 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
61 changes: 56 additions & 5 deletions .github/workflows/sdk-e2e-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -5,8 +5,6 @@ env:
PYTHONUTF8: 1

on:
push:
branches: [main]
pull_request:
workflow_dispatch:
merge_group:
Expand All @@ -15,8 +13,48 @@ permissions:
contents: read

jobs:
changes:
name: "Detect Changes"
runs-on: ubuntu-latest
outputs:
nodejs: ${{ steps.filter.outputs.nodejs }}
go: ${{ steps.filter.outputs.go }}
python: ${{ steps.filter.outputs.python }}
dotnet: ${{ steps.filter.outputs.dotnet }}
steps:
- uses: actions/checkout@v6.0.2
- uses: dorny/paths-filter@v3
id: filter
with:
filters: |
nodejs:
- 'nodejs/**'
- 'test/**'
- '.github/workflows/sdk-e2e-tests.yml'
- '.github/actions/setup-copilot/**'
go:
- 'go/**'
- 'test/**'
- 'nodejs/package.json'
- '.github/workflows/sdk-e2e-tests.yml'
- '.github/actions/setup-copilot/**'
python:
- 'python/**'
- 'test/**'
- 'nodejs/package.json'
- '.github/workflows/sdk-e2e-tests.yml'
- '.github/actions/setup-copilot/**'
dotnet:
- 'dotnet/**'
- 'test/**'
- 'nodejs/package.json'
- '.github/workflows/sdk-e2e-tests.yml'
- '.github/actions/setup-copilot/**'
nodejs-sdk:
name: "Node.js SDK Tests"
needs: changes
# Run if Node.js files changed, or on workflow_dispatch/merge_group
if: needs.changes.outputs.nodejs == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group'
strategy:
fail-fast: false
matrix:
Expand All @@ -34,6 +72,7 @@ jobs:
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

Expand All @@ -58,11 +97,14 @@ jobs:
- name: Run Node.js SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
COPILOT_CLI_PATH: ${{ steps.cli-path.outputs.path }}
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
run: npm test

go-sdk:
name: "Go SDK Tests"
needs: changes
# Run if Go files changed, or on workflow_dispatch/merge_group
if: needs.changes.outputs.go == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group'
strategy:
fail-fast: false
matrix:
Expand All @@ -75,6 +117,7 @@ jobs:
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"
Expand Down Expand Up @@ -110,11 +153,14 @@ jobs:
- name: Run Go SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
COPILOT_CLI_PATH: ${{ steps.cli-path.outputs.path }}
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
run: /bin/bash test.sh

python-sdk:
name: "Python SDK Tests"
needs: changes
# Run if Python files changed, or on workflow_dispatch/merge_group
if: needs.changes.outputs.python == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group'
strategy:
fail-fast: false
matrix:
Expand All @@ -127,6 +173,7 @@ jobs:
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"
Expand Down Expand Up @@ -159,11 +206,14 @@ jobs:
- name: Run Python SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
COPILOT_CLI_PATH: ${{ steps.cli-path.outputs.path }}
COPILOT_CLI_PATH: ${{ steps.setup-copilot.outputs.cli-path }}
run: uv run pytest -v -s

dotnet-sdk:
name: ".NET SDK Tests"
needs: changes
# Run if .NET files changed, or on workflow_dispatch/merge_group
if: needs.changes.outputs.dotnet == 'true' || github.event_name == 'workflow_dispatch' || github.event_name == 'merge_group'
strategy:
fail-fast: false
matrix:
Expand All @@ -176,6 +226,7 @@ jobs:
steps:
- uses: actions/checkout@v6.0.2
- uses: ./.github/actions/setup-copilot
id: setup-copilot
Copy link

Copilot AI Jan 29, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

The setup-copilot action is given an id here, but the corresponding COPILOT_CLI_PATH environment variable is not set in the .NET SDK test step (line 266-269). This is inconsistent with the other SDK tests (Node.js at line 100, Go at line 156, Python at line 209) which all use the setup-copilot outputs. The .NET SDK tests do use COPILOT_CLI_PATH (see dotnet/test/ClientTests.cs and dotnet/test/Harness/E2ETestContext.cs), so this environment variable should be added to the test step's env section.

Copilot uses AI. Check for mistakes.
Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

seems like the dotnet tests don't need it for some reason? they didn't have it before

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Fixed in 2703e85. The .NET SDK workflow now includes COPILOT_CLI_PATH in the test step's environment variables, consistent with the other SDK tests.

- uses: actions/setup-dotnet@v5
with:
dotnet-version: "8.0.x"
Expand Down
Loading