Skip to content
Latchkey

Integration MCP Tools Tests Backend workflow (kiali/kiali)

The Integration MCP Tools Tests Backend workflow from kiali/kiali, explained and optimized by Latchkey.

A

CI health: A - excellent

Point runs-on at Latchkey and get job timeouts, self-healing for flaky steps, and up to 58% lower cost, applied automatically.

Grade your own workflow free or run it on Latchkey →
Source: kiali/kiali.github/workflows/integration-tests-backend-mcp.ymlLicense Apache-2.0View source

What it does

This is the Integration MCP Tools Tests Backend workflow from the kiali/kiali repository, a real project running GitHub Actions. It is shown here with attribution under its Apache-2.0 license.

Below, Latchkey shows a faster, safer version produced by its optimization engine.

The workflow

workflow (.yml)
name: Integration MCP Tools Tests Backend

on:
  workflow_call:
    inputs:
      target_branch:
        required: true
        type: string
      build_branch:
        required: true
        type: string
      istio_version:
        required: false
        type: string
        default: ""

env:
  TARGET_BRANCH: ${{ inputs.target_branch }}
  # BUILD_BRANCH is used by setup-kind-in-ci.sh to locate a matching helm-charts branch.
  # If build_branch is empty, fallback to target_branch
  BUILD_BRANCH: ${{ inputs.build_branch || inputs.target_branch }}

jobs:
  integration_tests_backend:
    name: Backend API integration tests
    runs-on: ubuntu-latest
    steps:
    - name: Check out code
      uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
      with:
        ref: ${{ inputs.build_branch }}

    - name: Install Helm
      uses: Azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
      with:
        version: "v3.18.4"

    - name: Set up Go
      uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
      with:
        go-version-file: go.mod
        cache: true
        cache-dependency-path: go.sum

    - name: Download go binary
      uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
      with:
        name: kiali
        path: ~/go/bin/

    - name: Ensure kiali binary is executable
      run: chmod +x ~/go/bin/kiali

    - name: Run backend mcp tools integration tests
      id: intTests
      run: hack/run-integration-tests.sh --test-suite backend --mcp-tools true $(if [ -n "${{ inputs.istio_version }}" ]; then echo "--istio-version ${{ inputs.istio_version }}"; fi)

    - name: Get debug info when integration tests fail
      if: ${{ failure() && steps.intTests.conclusion == 'failure' }}
      run: |
        mkdir debug-output
        hack/ci-get-debug-info.sh --output-directory debug-output

    - name: Upload debug info artifact
      if: ${{ failure() && steps.intTests.conclusion == 'failure' }}
      uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
      with:
        name: debug-info-${{ github.job }}
        path: debug-output

    - name: Upload test results
      if: always()
      uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
      with:
        name: junit-rest-report-mcp-tools
        path: tests/integration/junit-rest-report-mcp-tools.xml
        if-no-files-found: warn

    - name: Store test metadata
      if: always()
      run: |
        mkdir -p test-metadata-mcp-tools
        echo "${{ inputs.istio_version }}" > test-metadata-mcp-tools/istio_version.txt

    - name: Upload test metadata
      if: always()
      uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
      with:
        name: backend-test-metadata-mcp-tools
        path: test-metadata-mcp-tools/


The same workflow, on Latchkey

Removes redundant runs and caps runaway jobs. Added and changed lines are highlighted.

name: Integration MCP Tools Tests Backend
 
on:
  workflow_call:
    inputs:
      target_branch:
        required: true
        type: string
      build_branch:
        required: true
        type: string
      istio_version:
        required: false
        type: string
        default: ""
 
env:
  TARGET_BRANCH: ${{ inputs.target_branch }}
  # BUILD_BRANCH is used by setup-kind-in-ci.sh to locate a matching helm-charts branch.
  # If build_branch is empty, fallback to target_branch
  BUILD_BRANCH: ${{ inputs.build_branch || inputs.target_branch }}
 
jobs:
  integration_tests_backend:
    timeout-minutes: 30
    name: Backend API integration tests
    runs-on: latchkey-small
    steps:
    - name: Check out code
      uses: actions/checkout@9c091bb21b7c1c1d1991bb908d89e4e9dddfe3e0 # v7.0.0
      with:
        ref: ${{ inputs.build_branch }}
 
    - name: Install Helm
      uses: Azure/setup-helm@9bc31f4ebc9c6b171d7bfbaa5d006ae7abdb4310 # v5.0.1
      with:
        version: "v3.18.4"
 
    - name: Set up Go
      uses: actions/setup-go@924ae3a1cded613372ab5595356fb5720e22ba16 # v6.5.0
      with:
        go-version-file: go.mod
        cache: true
        cache-dependency-path: go.sum
 
    - name: Download go binary
      uses: actions/download-artifact@3e5f45b2cfb9172054b4087a40e8e0b5a5461e7c # v8.0.1
      with:
        name: kiali
        path: ~/go/bin/
 
    - name: Ensure kiali binary is executable
      run: chmod +x ~/go/bin/kiali
 
    - name: Run backend mcp tools integration tests
      id: intTests
      run: hack/run-integration-tests.sh --test-suite backend --mcp-tools true $(if [ -n "${{ inputs.istio_version }}" ]; then echo "--istio-version ${{ inputs.istio_version }}"; fi)
 
    - name: Get debug info when integration tests fail
      if: ${{ failure() && steps.intTests.conclusion == 'failure' }}
      run: |
        mkdir debug-output
        hack/ci-get-debug-info.sh --output-directory debug-output
 
    - name: Upload debug info artifact
      if: ${{ failure() && steps.intTests.conclusion == 'failure' }}
      uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
      with:
        name: debug-info-${{ github.job }}
        path: debug-output
 
    - name: Upload test results
      if: always()
      uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
      with:
        name: junit-rest-report-mcp-tools
        path: tests/integration/junit-rest-report-mcp-tools.xml
        if-no-files-found: warn
 
    - name: Store test metadata
      if: always()
      run: |
        mkdir -p test-metadata-mcp-tools
        echo "${{ inputs.istio_version }}" > test-metadata-mcp-tools/istio_version.txt
 
    - name: Upload test metadata
      if: always()
      uses: actions/upload-artifact@043fb46d1a93c77aae656e7c1c64a875d1fc6a0a # v7.0.1
      with:
        name: backend-test-metadata-mcp-tools
        path: test-metadata-mcp-tools/
 
 
 

What changed

This workflow runs 1 job per trigger. On Latchkey the same minutes cost up to 58% less than GitHub-hosted, with zero queue time.

Actions used in this workflow