Surface tool creation failures as unavailable MCP tools (#10328) #2416
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: Main Branch Coverage | |
| on: | |
| push: | |
| branches: | |
| - main | |
| - main-version-* | |
| paths: | |
| - "src/**" | |
| concurrency: | |
| group: main-coverage-${{ github.ref }} | |
| permissions: | |
| contents: read | |
| jobs: | |
| configure: | |
| name: Generate Test Matrix | |
| runs-on: ubuntu-latest | |
| outputs: | |
| matrix: ${{ steps.set-matrix.outputs.matrix }} | |
| steps: | |
| - name: Checkout to repository | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| show-progress: false | |
| - name: Generate Test Matrix | |
| id: set-matrix | |
| uses: ./.github/actions/generate-test-matrix | |
| library-tests: | |
| name: Run ${{ matrix.name }} | |
| runs-on: ubuntu-latest | |
| needs: configure | |
| env: | |
| DOCKER_CONFIG: ${{ github.workspace }}/.docker | |
| strategy: | |
| fail-fast: false | |
| matrix: ${{ fromJson(needs.configure.outputs.matrix) }} | |
| steps: | |
| - name: Checkout repository | |
| uses: actions/checkout@df4cb1c069e1874edd31b4311f1884172cec0e10 # v6.0.3 | |
| with: | |
| show-progress: false | |
| - name: Install .NET | |
| uses: actions/setup-dotnet@9a946fdbd5fb07b82b2f5a4466058b876ab72bb2 # v5.3.0 | |
| with: | |
| dotnet-version: | | |
| 8.x | |
| 9.x | |
| 10.x | |
| 11.0.100-preview.6.26359.118 | |
| - name: Run Build | |
| id: run-build | |
| run: dotnet build ${{ matrix.path }} --framework net11.0 --verbosity q | |
| timeout-minutes: 5 | |
| - name: Log in to Docker Hub | |
| uses: docker/login-action@650006c6eb7dba73a995cc03b0b2d7f5ca915bee # v4.2.0 | |
| with: | |
| username: ${{ vars.DOCKERHUB_USERNAME }} | |
| password: ${{ secrets.DOCKERHUB_TOKEN }} | |
| - name: Run tests | |
| id: run-tests | |
| timeout-minutes: 15 | |
| continue-on-error: true | |
| run: > | |
| dotnet test | |
| --project ${{ matrix.path }} | |
| --framework net11.0 | |
| --no-build | |
| --coverage | |
| --coverage-output-format cobertura | |
| --report-trx | |
| --results-directory ${{ matrix.directoryPath }}/TestResults | |
| --verbosity q | |
| env: | |
| CI_BUILD: true | |
| - name: Upload Test Results as Artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: test-results-${{ matrix.name }} | |
| path: ${{ matrix.directoryPath }}/TestResults/*.trx | |
| - name: Upload Coverage File as Artifact | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: coverage-${{ matrix.name }} | |
| path: ${{ matrix.directoryPath }}/TestResults/*.cobertura.xml | |
| - name: Upload mismatch files as Artifact | |
| if: failure() | |
| uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7 | |
| with: | |
| name: mismatch-files-${{ matrix.name }} | |
| path: ${{ matrix.directoryPath }}/**/__mismatch__/* | |
| - name: Fail if tests failed or were cancelled | |
| run: exit 1 | |
| if: | | |
| steps.run-tests.outcome == 'failure' || | |
| steps.run-tests.outcome == 'cancelled' |