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
83 changes: 81 additions & 2 deletions .github/workflows/pull-request.yml
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
name: Test
name: Test
on:
pull_request:
branches:
Expand All @@ -11,4 +11,83 @@ jobs:
uses: tryAGI/workflows/.github/workflows/generated-sdk-pull-request.yml@main
with:
project-path: AutoSDK.slnx
additional-test-arguments: '--logger GitHubActions'
additional-test-arguments: '--logger GitHubActions --filter "FullyQualifiedName!~AutoSDK.IntegrationTests.Cli"'

test-cli-integration:
name: test-cli-integration (shard ${{ matrix.shard }})
runs-on: ubuntu-latest
strategy:
fail-fast: false
matrix:
shard: [0, 1, 2, 3, 4, 5, 6, 7]
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Setup .NET
uses: actions/setup-dotnet@v6
with:
dotnet-version: 10.0.x

- name: Cache NuGet packages
uses: actions/cache@v6
with:
path: ~/.nuget/packages
key: ${{ runner.os }}-nuget-cli-integration-${{ hashFiles('**/*.csproj', '**/Directory.Packages.props', '**/global.json') }}
restore-keys: |
${{ runner.os }}-nuget-cli-integration-
${{ runner.os }}-nuget-

- name: Run integration test shard
run: ./scripts/run-test-shard.sh
src/tests/AutoSDK.IntegrationTests.Cli/AutoSDK.IntegrationTests.Cli.csproj
${{ matrix.shard }}
8
Release

- name: Upload shard diagnostics
if: always()
uses: actions/upload-artifact@v7
with:
name: cli-integration-shard-${{ matrix.shard }}
path: artifacts/test-shards
if-no-files-found: warn
retention-days: 14

test-cli-integration-summary:
name: test-cli-integration summary
runs-on: ubuntu-latest
needs: test-cli-integration
if: always()
steps:
- name: Checkout
uses: actions/checkout@v7

- name: Download shard diagnostics
continue-on-error: true
uses: actions/download-artifact@v8
with:
pattern: cli-integration-shard-*
path: artifacts/test-shards-input

- name: Build shard summary
run: python3 scripts/summarize-test-shards.py
artifacts/test-shards-input
artifacts/test-shards-summary
--expected-shards 8

- name: Publish job summary
run: cat artifacts/test-shards-summary/summary.md >> "$GITHUB_STEP_SUMMARY"

- name: Upload shard summary
uses: actions/upload-artifact@v7
with:
name: cli-integration-summary
path: artifacts/test-shards-summary
retention-days: 30

- name: Enforce shard SLA
run: python3 scripts/check-test-shard-sla.py
artifacts/test-shards-summary/shards.csv
--expected-shards 8
--max-elapsed-seconds 720
2 changes: 1 addition & 1 deletion src/libs/AutoSDK.CLI/AutoSDK.CLI.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -31,7 +31,7 @@
<PackageReference Include="Microsoft.OpenApi" Version="$(MicrosoftOpenApiVersion)" />
<PackageReference Include="Microsoft.OpenApi.YamlReader" Version="$(MicrosoftOpenApiVersion)" />
<PackageReference Include="Google.Protobuf" Version="3.36.2" />
<PackageReference Include="System.CommandLine" Version="2.0.12" />
<PackageReference Include="System.CommandLine" Version="2.0.13" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -48,8 +48,8 @@
<PackageReference Include="Microsoft.CodeAnalysis.CSharp" Version="4.3.1" PrivateAssets="all" />
<PackageReference Include="Microsoft.OpenApi" Version="$(MicrosoftOpenApiVersion)" />
<PackageReference Include="Microsoft.OpenApi.YamlReader" Version="$(MicrosoftOpenApiVersion)" PrivateAssets="all" />
<PackageReference Include="System.Collections.Immutable" Version="10.0.12" PrivateAssets="all" />
<PackageReference Include="System.Text.Json" Version="10.0.12" PrivateAssets="all" />
<PackageReference Include="System.Collections.Immutable" Version="10.0.13" PrivateAssets="all" />
<PackageReference Include="System.Text.Json" Version="10.0.13" PrivateAssets="all" />
</ItemGroup>

</Project>
4 changes: 2 additions & 2 deletions src/libs/AutoSDK/AutoSDK.csproj
Original file line number Diff line number Diff line change
Expand Up @@ -20,8 +20,8 @@
</ItemGroup>

<ItemGroup Condition="!$([MSBuild]::IsTargetFrameworkCompatible('$(TargetFramework)', 'net10.0'))">
<PackageReference Include="System.Collections.Immutable" Version="10.0.12" />
<PackageReference Include="System.Text.Json" Version="10.0.12" />
<PackageReference Include="System.Collections.Immutable" Version="10.0.13" />
<PackageReference Include="System.Text.Json" Version="10.0.13" />
</ItemGroup>

<ItemGroup>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -8,7 +8,7 @@

<ItemGroup>
<PackageReference Include="Google.Apis.Core" Version="1.77.0" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.12" />
<PackageReference Include="Microsoft.Extensions.Http" Version="10.0.13" />
</ItemGroup>

<ItemGroup>
Expand Down
Loading