chore(deps): update actions/checkout digest #521
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: E2E Tests | |
| on: | |
| push: | |
| branches: [main] | |
| pull_request: | |
| schedule: | |
| - cron: "0 0 * * *" | |
| permissions: | |
| contents: read | |
| jobs: | |
| test-python-e2e: | |
| name: Python E2E Tests (${{ matrix.transport }}) | |
| if: github.event_name != 'pull_request' || github.event.pull_request.head.repo.full_name == github.repository | |
| runs-on: ubuntu-latest | |
| strategy: | |
| matrix: | |
| transport: [stdio, sse, streamable-http] | |
| permissions: | |
| id-token: write | |
| contents: read | |
| env: | |
| # Set auth here so stdio transport and background process pick them up | |
| GRAFANA_USERNAME: admin | |
| GRAFANA_PASSWORD: admin | |
| steps: | |
| - name: Checkout code | |
| uses: actions/checkout@08c6903cd8c0fde910a37f88322edcfb5dd907a8 # v5.0.0 | |
| - name: Install uv | |
| uses: astral-sh/setup-uv@85856786d1ce8acfbcc2f13a5f3fbd6b938f9f41 # v7.1.2 | |
| - name: Set up Go | |
| uses: actions/setup-go@44694675825211faa026b3c33043df3e48a5fa00 # v6.0.0 | |
| with: | |
| go-version: "1.24" | |
| cache: true | |
| - name: Install Python dependencies | |
| run: | | |
| cd tests | |
| uv sync --all-groups | |
| - id: get-secrets | |
| uses: grafana/shared-workflows/actions/get-vault-secrets@a37de51f3d713a30a9e4b21bcdfbd38170020593 # get-vault-secrets/v1.3.0 | |
| with: | |
| # Secrets placed in the ci/repo/grafana/mcp-grafana/<path> path in Vault | |
| repo_secrets: | | |
| ANTHROPIC_API_KEY=anthropic:api-key | |
| OPENAI_API_KEY=openai:api-key | |
| - name: Start docker-compose services | |
| uses: hoverkraft-tech/compose-action@2c655a3602eeee00c12d1f4edd41f7af43baf2e9 | |
| with: | |
| compose-file: "docker-compose.yaml" | |
| - name: Wait for Grafana server and Prometheus server to start and scrape | |
| run: sleep 30 | |
| - name: Build mcp-grafana | |
| run: go build -o dist/mcp-grafana ./cmd/mcp-grafana | |
| - name: Start MCP server in background | |
| if: matrix.transport != 'stdio' | |
| run: nohup ./dist/mcp-grafana -t ${{ matrix.transport }} > mcp.log 2>&1 & | |
| - name: Run Python e2e tests | |
| env: | |
| MCP_GRAFANA_PATH: ../dist/mcp-grafana | |
| MCP_TRANSPORT: ${{ matrix.transport }} | |
| run: | | |
| cd tests | |
| uv run pytest | |
| - if: failure() && matrix.transport != 'stdio' | |
| name: Print MCP logs | |
| run: cat mcp.log |