Small updates

This commit is contained in:
Dmytro Struk
2026-02-20 15:40:29 -08:00
Unverified
parent 30c3abdbf0
commit 661f8588a1
3 changed files with 20 additions and 7 deletions
+11 -5
View File
@@ -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
@@ -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
+7 -2
View File
@@ -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