@@ -21,7 +21,6 @@ concurrency:
2121
2222permissions :
2323 contents : read
24- id-token : " write"
2524
2625jobs :
2726 paths-filter :
@@ -60,14 +59,11 @@ jobs:
6059 dotnet : " 10.0" ,
6160 os : " ubuntu-latest" ,
6261 configuration : Release,
63- integration-tests : true,
64- environment : " integration" ,
6562 }
6663 - { dotnet: "10.0", os: "windows-latest", configuration: Debug }
6764 - { dotnet: "9.0", os: "windows-latest", configuration: Release }
6865
6966 runs-on : ${{ matrix.os }}
70- environment : ${{ matrix.environment }}
7167 steps :
7268 - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
7369 with :
@@ -124,8 +120,43 @@ jobs:
124120 shell : pwsh
125121 run : .github/workflows/test-aot-compatibility.ps1 ${{ matrix.dotnet }}
126122
123+ # Generate test reports and check coverage
124+ - name : Generate test reports
125+ uses : danielpalme/ReportGenerator-GitHub-Action@18e0cd4c1bebd0c8b3978b380a6a4ea61c51178e # 5.4.15
126+ with :
127+ reports : " ./TestResults/Coverage/**/coverage.cobertura.xml"
128+ targetdir : " ./TestResults/Reports"
129+ reporttypes : " HtmlInline;JsonSummary"
130+
131+ - name : Upload coverage report artifact
132+ uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
133+ with :
134+ name : CoverageReport-${{ matrix.os }}-${{ matrix.dotnet }}-${{ matrix.configuration }} # Artifact name
135+ path : ./TestResults/Reports # Directory containing files to upload
136+
137+ - name : Check coverage
138+ shell : pwsh
139+ run : .github/workflows/check-coverage.ps1 -JsonReportPath "TestResults/Reports/Summary.json" -CoverageThreshold $env:COVERAGE_THRESHOLD
140+
141+ dotnet-integration-tests :
142+ needs : paths-filter
143+ if : (github.event_name != 'pull_request' || (github.actor != 'dependabot[bot]' && github.event.pull_request.head.repo.full_name == github.repository)) && needs.paths-filter.outputs.dotnetChanges == 'true'
144+ runs-on : ubuntu-latest
145+ environment : " integration"
146+ permissions :
147+ contents : read
148+ id-token : write
149+ steps :
150+ - uses : actions/checkout@3d3c42e5aac5ba805825da76410c181273ba90b1 # v7.0.1
151+ with :
152+ persist-credentials : false
153+
154+ - name : Setup dotnet
155+ uses : actions/setup-dotnet@26b0ec14cb23fa6904739307f278c14f94c95bf1 # v5.4.0
156+ with :
157+ global-json-file : ${{ github.workspace }}/dotnet/global.json
158+
127159 - name : Azure CLI Login
128- if : github.event_name != 'pull_request' && matrix.integration-tests
129160 uses : azure/login@7184910d9eb2b1c5e48f7073824a90609bb9b6d6 # v2.3.1
130161 with :
131162 client-id : ${{ secrets.AZURE_CLIENT_ID }}
@@ -134,11 +165,10 @@ jobs:
134165
135166 - name : Run Integration Tests
136167 shell : bash
137- if : github.event_name != 'pull_request' && matrix.integration-tests
138168 run : |
139169 export INTEGRATION_TEST_PROJECTS=$(find ./dotnet -type f -name "*IntegrationTests.csproj" | grep -v "Experimental.Orchestration.Flow.IntegrationTests.csproj" | grep -v "VectorDataIntegrationTests.csproj" | tr '\n' ' ')
140170 for project in $INTEGRATION_TEST_PROJECTS; do
141- dotnet test -f net10.0 -c ${{ matrix.configuration }} $project --no-build -v Normal --logger trx
171+ dotnet test -f net10.0 -c Release $project -v Normal --logger trx
142172 done
143173 env :
144174 # Azure OpenAI Deployments
@@ -182,29 +212,11 @@ jobs:
182212 AzureAI__ConnectionString : ${{ secrets.AZUREAI__CONNECTIONSTRING }}
183213 AzureAI__ChatModelId : ${{ vars.AZUREAI__CHATMODELID }}
184214
185- # Generate test reports and check coverage
186- - name : Generate test reports
187- uses : danielpalme/ReportGenerator-GitHub-Action@18e0cd4c1bebd0c8b3978b380a6a4ea61c51178e # 5.4.15
188- with :
189- reports : " ./TestResults/Coverage/**/coverage.cobertura.xml"
190- targetdir : " ./TestResults/Reports"
191- reporttypes : " HtmlInline;JsonSummary"
192-
193- - name : Upload coverage report artifact
194- uses : actions/upload-artifact@ea165f8d65b6e75b540449e92b4886f43607fa02 # v4.6.2
195- with :
196- name : CoverageReport-${{ matrix.os }}-${{ matrix.dotnet }}-${{ matrix.configuration }} # Artifact name
197- path : ./TestResults/Reports # Directory containing files to upload
198-
199- - name : Check coverage
200- shell : pwsh
201- run : .github/workflows/check-coverage.ps1 -JsonReportPath "TestResults/Reports/Summary.json" -CoverageThreshold $env:COVERAGE_THRESHOLD
202-
203215 # This final job is required to satisfy the merge queue. It must only run (or succeed) if no tests failed
204216 dotnet-build-and-test-check :
205217 if : always()
206218 runs-on : ubuntu-latest
207- needs : [dotnet-build-and-test]
219+ needs : [dotnet-build-and-test, dotnet-integration-tests ]
208220 steps :
209221 - name : Get Date
210222 shell : bash
0 commit comments