From 661f8588a1b7fe59f1fa45f0a50d1598284b6c84 Mon Sep 17 00:00:00 2001 From: Dmytro Struk <13853051+dmytrostruk@users.noreply.github.com> Date: Fri, 20 Feb 2026 15:40:29 -0800 Subject: [PATCH] Small updates --- .github/workflows/dotnet-build-and-test.yml | 16 +++++++++++----- ...ntegration-tests-manual.yml => int-tests.yml} | 2 ++ .github/workflows/python-merge-tests.yml | 9 +++++++-- 3 files changed, 20 insertions(+), 7 deletions(-) rename .github/workflows/{integration-tests-manual.yml => int-tests.yml} (98%) diff --git a/.github/workflows/dotnet-build-and-test.yml b/.github/workflows/dotnet-build-and-test.yml index 365c10c28b..ae8dcf5c21 100644 --- a/.github/workflows/dotnet-build-and-test.yml +++ b/.github/workflows/dotnet-build-and-test.yml @@ -14,6 +14,11 @@ on: required: false type: string default: "" + integration-only: + description: "Run only integration tests (skip unit tests, coverage, and non-integration matrix entries)" + required: false + type: boolean + default: false pull_request: branches: ["main", "feature*"] merge_group: @@ -71,7 +76,7 @@ jobs: dotnet-build-and-test: needs: paths-filter - if: needs.paths-filter.outputs.dotnetChanges == 'true' + if: needs.paths-filter.outputs.dotnetChanges == 'true' && (inputs.integration-only != true || matrix.integration-tests) strategy: fail-fast: false matrix: @@ -120,7 +125,7 @@ jobs: shell: bash # All frameworks are only built for the release configuration, so we only run this step for the release configuration # and dotnet new doesn't support net472 - if: matrix.configuration == 'Release' && matrix.targetFramework != 'net472' + if: inputs.integration-only != true && matrix.configuration == 'Release' && matrix.targetFramework != 'net472' run: | TEMP_DIR=$(mktemp -d) @@ -152,6 +157,7 @@ jobs: rm -rf "$TEMP_DIR" - name: Run Unit Tests + if: inputs.integration-only != true shell: bash run: | export UT_PROJECTS=$(find ./dotnet -type f -name "*.UnitTests.csproj" | tr '\n' ' ') @@ -233,7 +239,7 @@ jobs: # Generate test reports and check coverage - name: Generate test reports - if: matrix.targetFramework == env.COVERAGE_FRAMEWORK + if: inputs.integration-only != true && matrix.targetFramework == env.COVERAGE_FRAMEWORK uses: danielpalme/ReportGenerator-GitHub-Action@5.5.1 with: reports: "./TestResults/Coverage/**/coverage.cobertura.xml" @@ -241,14 +247,14 @@ jobs: reporttypes: "HtmlInline;JsonSummary" - name: Upload coverage report artifact - if: matrix.targetFramework == env.COVERAGE_FRAMEWORK + if: inputs.integration-only != true && matrix.targetFramework == env.COVERAGE_FRAMEWORK uses: actions/upload-artifact@v6 with: name: CoverageReport-${{ matrix.os }}-${{ matrix.targetFramework }}-${{ matrix.configuration }} # Artifact name path: ./TestResults/Reports # Directory containing files to upload - name: Check coverage - if: matrix.targetFramework == env.COVERAGE_FRAMEWORK + if: inputs.integration-only != true && matrix.targetFramework == env.COVERAGE_FRAMEWORK shell: pwsh run: .github/workflows/dotnet-check-coverage.ps1 -JsonReportPath "TestResults/Reports/Summary.json" -CoverageThreshold $env:COVERAGE_THRESHOLD diff --git a/.github/workflows/integration-tests-manual.yml b/.github/workflows/int-tests.yml similarity index 98% rename from .github/workflows/integration-tests-manual.yml rename to .github/workflows/int-tests.yml index 6cadbdc1c1..28866c39ff 100644 --- a/.github/workflows/integration-tests-manual.yml +++ b/.github/workflows/int-tests.yml @@ -122,6 +122,7 @@ jobs: uses: ./.github/workflows/dotnet-build-and-test.yml with: checkout-ref: ${{ needs.resolve-ref.outputs.checkout-ref }} + integration-only: true secrets: inherit python-integration-tests: @@ -131,4 +132,5 @@ jobs: uses: ./.github/workflows/python-merge-tests.yml with: checkout-ref: ${{ needs.resolve-ref.outputs.checkout-ref }} + integration-only: true secrets: inherit diff --git a/.github/workflows/python-merge-tests.yml b/.github/workflows/python-merge-tests.yml index 37bebced6b..3ac5cf6846 100644 --- a/.github/workflows/python-merge-tests.yml +++ b/.github/workflows/python-merge-tests.yml @@ -9,6 +9,11 @@ on: required: false type: string default: "" + integration-only: + description: "Run only integration tests (skip sample tests)" + required: false + type: boolean + default: false pull_request: branches: ["main"] merge_group: @@ -111,7 +116,7 @@ jobs: working-directory: ./python - name: Test core samples timeout-minutes: 10 - if: env.RUN_SAMPLES_TESTS == 'true' + if: inputs.integration-only != true && env.RUN_SAMPLES_TESTS == 'true' run: uv run pytest tests/samples/ -m "openai" -m "azure" working-directory: ./python - name: Surface failing tests @@ -170,7 +175,7 @@ jobs: working-directory: ./python - name: Test Azure AI samples timeout-minutes: 10 - if: env.RUN_SAMPLES_TESTS == 'true' + if: inputs.integration-only != true && env.RUN_SAMPLES_TESTS == 'true' run: uv run pytest tests/samples/ -m "azure-ai" working-directory: ./python - name: Surface failing tests