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
44 changes: 41 additions & 3 deletions .github/workflows/dotnet-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -12,7 +12,7 @@ permissions:

jobs:
test:
name: ".NET SDK Tests (${{ matrix.os }}, ${{ matrix.transport }}, ${{ matrix.backend }})"
name: ".NET SDK Tests (${{ matrix.os }}, ${{ matrix.transport }}, ${{ matrix.backend }}, ${{ matrix.shard }})"
if: github.event.repository.fork == false
env:
POWERSHELL_UPDATECHECK: Off
Expand All @@ -24,22 +24,39 @@ jobs:
os: [ubuntu-latest, macos-latest, windows-latest]
transport: ["default", "inprocess"]
backend: [capi]
shard: [full]
# TODO: Re-enable after fixing in-process sqlite file locking on shutdown on Windows.
exclude:
- os: windows-latest
transport: "inprocess"
- os: windows-latest
transport: default
shard: full
include:
# Keep xUnit serial within each process, but split the slow Windows
# default-transport suite across two isolated test hosts.
- os: windows-latest
transport: default
backend: capi
shard: "1"
- os: windows-latest
transport: default
backend: capi
shard: "2"
- os: ubuntu-latest
transport: inprocess
backend: anthropic-messages
shard: full
test-filter: "FullyQualifiedName~GitHub.Copilot.Test.E2E&E2EBackend!=SelfConfiguredBackend&E2EBackend!=CapiOnly"
- os: ubuntu-latest
transport: inprocess
backend: openai-responses
shard: full
test-filter: "FullyQualifiedName~GitHub.Copilot.Test.E2E&E2EBackend!=SelfConfiguredBackend&E2EBackend!=CapiOnly"
- os: ubuntu-latest
transport: inprocess
backend: openai-completions
shard: full
test-filter: "FullyQualifiedName~GitHub.Copilot.Test.E2E&E2EBackend!=SelfConfiguredBackend&E2EBackend!=CapiOnly"
runs-on: ${{ matrix.os }}
defaults:
Expand Down Expand Up @@ -92,9 +109,30 @@ jobs:
- name: Run .NET SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
DOTNET_TEST_SHARD: ${{ matrix.shard }}
run: |
args=(--no-build -v n)
if [[ -n "$DOTNET_TEST_FILTER" ]]; then
args+=(--filter "$DOTNET_TEST_FILTER")

filter="$DOTNET_TEST_FILTER"
if [[ "$DOTNET_TEST_SHARD" != "full" ]]; then
if [[ "$DOTNET_TEST_SHARD" == "1" ]]; then
initials=(A C D H I J K L N Q S U W Y)
shard_filter="FullyQualifiedName~GitHub.Copilot.Test.ConnectionToken"
else
initials=(B E F G M O P R T V X Z)
shard_filter=""
fi

for namespace in E2E Unit; do
for initial in "${initials[@]}"; do
clause="FullyQualifiedName~GitHub.Copilot.Test.${namespace}.${initial}"
shard_filter="${shard_filter:+${shard_filter}|}${clause}"
done
done
filter="${filter:+(${filter})&}(${shard_filter})"
fi

if [[ -n "$filter" ]]; then
args+=(--filter "$filter")
fi
dotnet test "${args[@]}"
4 changes: 3 additions & 1 deletion .github/workflows/python-sdk-tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -79,4 +79,6 @@ jobs:
- name: Run Python SDK tests
env:
COPILOT_HMAC_KEY: ${{ secrets.COPILOT_DEVELOPER_CLI_INTEGRATION_HMAC_KEY }}
run: uv run pytest -v -s
# Keep each module's shared E2E client and proxy on one process while
# running independent modules concurrently in isolated workers.
run: uv run pytest -v -s -n 2 --dist=loadfile
1 change: 1 addition & 0 deletions python/pyproject.toml
Original file line number Diff line number Diff line change
Expand Up @@ -46,6 +46,7 @@ dev = [
"pytest>=7.0.0",
"pytest-asyncio>=0.21.0",
"pytest-timeout>=2.0.0",
"pytest-xdist>=3.6.0",
"websockets>=12.0",
"opentelemetry-sdk>=1.0.0",
]
Expand Down
Loading