ci: register logger for native AOT tests #793
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| name: Publish | |
| on: | |
| workflow_dispatch: | |
| push: | |
| branches: | |
| - main | |
| tags: | |
| - v** | |
| permissions: | |
| contents: write | |
| jobs: | |
| publish: | |
| name: Publish | |
| uses: tryAGI/workflows/.github/workflows/dotnet-sdk-build-test-publish.yml@main | |
| with: | |
| project-path: AutoSDK.slnx | |
| additional-test-arguments: '--logger GitHubActions --no-build --filter "FullyQualifiedName!~AutoSDK.IntegrationTests"' | |
| secrets: | |
| nuget-key: ${{ secrets.NUGET_KEY }} | |
| 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 | |
| test-cli: | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| spec: | |
| - ai21.json | |
| - anthropic.yaml | |
| - assemblyai.yaml | |
| - cohere.yaml | |
| #- github.yaml | |
| - huggingface.yaml | |
| - ipinfo.yaml | |
| - langsmith.json | |
| - leonardo.yaml | |
| - mystic.yaml | |
| - ollama.yaml | |
| - openai.yaml | |
| - petstore.yaml | |
| - replicate.json | |
| - special-cases.yaml | |
| - together.yaml | |
| - heygen.yaml | |
| - instill.yaml | |
| - ideogram.yaml | |
| - google-gemini.yaml | |
| - vectara.yaml | |
| - mistral.yaml | |
| #- weaviate.yaml #JsonSerializerContext.g.cs(107,33): error SYSLIB1031: There are multiple types named 'Object'. Source was generated for the first one detected. Use 'JsonSerializableAttribute.TypeInfoPropertyName' to resolve this collision. | |
| - elevenlabs.json | |
| - jina.json | |
| - recraft.yaml | |
| - luma.yaml | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Setup .NET | |
| uses: actions/setup-dotnet@v6 | |
| with: | |
| dotnet-version: 10.0.x | |
| - name: Generate code | |
| run: dotnet run --framework net10.0 --project src/libs/AutoSDK.CLI | |
| init | |
| TestSolution | |
| TestApi | |
| https://raw.githubusercontent.com/api/openapi.json | |
| TestCompany | |
| --output TestProject | |
| --add-tests false | |
| - name: Generate code | |
| run: dotnet run --framework net10.0 --project src/libs/AutoSDK.CLI | |
| generate specs/${{ matrix.spec }} | |
| --namespace TestSolution | |
| --targetFramework net10.0 | |
| --output TestProject/src/libs/TestSolution/Generated | |
| --ignore-openapi-errors | |
| - name: Build | |
| run: dotnet build TestProject | |
| /p:TreatWarningsAsErrors=true | |
| release: | |
| name: Release | |
| runs-on: ubuntu-latest | |
| needs: [publish, test-cli, test-cli-integration] | |
| if: startsWith(github.ref, 'refs/tags/v') | |
| steps: | |
| - name: Checkout | |
| uses: actions/checkout@v7 | |
| - name: Create release | |
| run: gh release create ${{ github.ref_name }} | |
| --title "${{ github.ref_name }}" | |
| --generate-notes | |
| env: | |
| GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }} |