feat(metrics): expose query-metrics and metric-names-list MCP tools #1235
Workflow file for this run
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: CI CLI | |
| permissions: | |
| contents: read | |
| on: | |
| pull_request: | |
| paths: | |
| - 'cli/**' | |
| - 'services/mcp/src/cli/**' | |
| - 'services/mcp/src/tools/**' | |
| - 'services/mcp/src/api/**' | |
| - 'services/mcp/schema/**' | |
| - 'services/mcp/scripts/build-cli*.ts' | |
| - 'services/mcp/scripts/hono-esbuild-config.ts' | |
| - 'services/mcp/package.json' | |
| - 'dist-workspace.toml' | |
| - 'pnpm-lock.yaml' | |
| - '.github/workflows/release.yml' | |
| - '.github/workflows/ci-cli.yml' | |
| - '.github/workflows/release-cli.yml' | |
| concurrency: | |
| group: ${{ github.workflow }}-${{ github.head_ref || github.ref }} | |
| cancel-in-progress: ${{ github.event_name == 'pull_request' }} | |
| jobs: | |
| tests: | |
| name: Run tests | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| working-directory: cli | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install rust | |
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | |
| with: | |
| toolchain: 1.91.1 | |
| - name: Check Cargo.lock is up to date | |
| run: | | |
| cargo update --workspace --locked | |
| git diff --exit-code Cargo.lock | |
| - name: Run tests | |
| run: cargo test --all-features | |
| clippy: | |
| name: Clippy | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| defaults: | |
| run: | |
| working-directory: cli | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install rust | |
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | |
| with: | |
| toolchain: 1.91.1 | |
| components: clippy | |
| - name: Run clippy | |
| run: cargo clippy --all-targets --all-features -- -D warnings | |
| format: | |
| name: Format | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 5 | |
| defaults: | |
| run: | |
| working-directory: cli | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Install rust | |
| uses: dtolnay/rust-toolchain@3c5f7ea28cd621ae0bf5283f0e981fb97b8a7af9 | |
| with: | |
| toolchain: 1.91.1 | |
| components: rustfmt | |
| - name: Check formatting | |
| run: cargo fmt --all -- --check | |
| api-cli-release-bundle: | |
| name: API CLI release bundle | |
| runs-on: ubuntu-latest | |
| timeout-minutes: 10 | |
| steps: | |
| - uses: actions/checkout@de0fac2e4500dabe0009e67214ff5f5447ce83dd # v6.0.2 | |
| - name: Setup pnpm | |
| uses: pnpm/action-setup@0e279bb959325dab635dd2c09392533439d90093 # v6.0.8 | |
| - name: Setup Node.js | |
| uses: actions/setup-node@6044e13b5dc448c55e2357c09f80417699197238 # v6.2.0 | |
| with: | |
| node-version-file: .nvmrc | |
| cache: 'pnpm' | |
| - name: Install API CLI dependencies | |
| run: pnpm --filter '@posthog/mcp...' install --frozen-lockfile | |
| - name: Build API CLI release bundle | |
| run: pnpm --dir services/mcp run build:cli:release | |
| - name: Verify API CLI release bundle | |
| run: node -e "const { statSync } = require('node:fs'); if (statSync('cli/lib/posthog-api-cli.mjs').size <= 0) process.exit(1)" |