Jump to content

Every page here is a learning from Kapso, experimenting on public repositories in each of their environments and use cases. Give your coding agent these learnings: connect the Leeroopedia MCP to Claude Code, Cursor or Codex ($20 free credit). Powered by Leeroo · founders@leeroo.com

Implementation:1mcp app Agent Test And Validate Workflow

From Leeroopedia
Knowledge Sources
Domains CI_CD, Testing
Last Updated 2026-10-29 00:00 GMT

Overview

Concrete GitHub Actions workflow that runs the full 1MCP test and validation matrix—static checks, unit and admin tests, protocol regressions, E2E sharding, browser E2E, legacy upgrade, Windows installer, and release-gate aggregation—across push, pull request, and reusable workflow call triggers.

Description

The test-and-validate.yml workflow (named `CI`) is the primary quality gate for 1MCP. It triggers on pushes to `main` (ignoring docs/markdown), pull requests, manual dispatch, and reusable workflow calls from the release pipeline. The `static` job runs actionlint, `pnpm ci:static`, release fixture tests, and permission-mode guards. The `unit-admin` job runs unit and admin console tests. The `ci` job aggregates `static`, `unit-admin`, and `test-protocol` as a required gate that fails closed on skipped/cancelled jobs. E2E tests run in four parallel shards plus a separate system-lifecycle shard, a browser shard (Playwright/Chromium), and a legacy-upgrade matrix (Ubuntu + macOS). A Windows installer job validates scheduled-task installation. When invoked with `release_gate: true` (from the release pipeline), the workflow also runs the cooperative-runtime lifecycle test and produces a `release-gates` artifact that aggregates all check results for the release candidate SHA.

Usage

Use this workflow when you need to:

  • Run the full CI test suite locally or understand what CI validates
  • Add a new test lane or understand shard assignment for E2E tests
  • Configure the release gate mode for release-candidate validation
  • Trace which checks are required before a release can publish

Code Reference

Source Location

Signature

name: CI

on:
  push:
    branches: [main]
    paths-ignore: ['**/*.md', 'docs/**', 'README*', 'CHANGELOG*']
  pull_request:
    paths-ignore: ['**/*.md', 'docs/**', 'README*', 'CHANGELOG*']
  workflow_dispatch:
  workflow_call:
    inputs:
      checkout_ref:
        description: 'Ref to check out for reusable CI runs.'
        required: false
        type: string
      release_gate:
        description: 'Require all product checks for a release candidate.'
        required: false
        type: boolean
        default: false

# Jobs: static, unit-admin, ci (gate), test-e2e-parallel [4 shards],
#   test-e2e-system, test-protocol, test-e2e-browser,
#   test-legacy-upgrade [ubuntu/macos], test-windows-installer,
#   release-lifecycle (release_gate only), release-result (release_gate only)

Import

# Called from release-pipeline.yml as a reusable workflow:
# uses: ./.github/workflows/test-and-validate.yml
# with:
#   checkout_ref: ${{ needs.candidate.outputs.release_sha }}
#   release_gate: true

I/O Contract

Inputs

Name Type Required Description
checkout_ref string No Git ref to check out (for reusable calls from release pipeline)
release_gate boolean No When true, require all product checks and run release-lifecycle; defaults to false

Outputs

Name Type Description
release-gates artifact JSON Aggregated check results for the release candidate SHA (release_gate mode only)
e2e-timings artifacts JSON Per-shard E2E timing reports for duration-based sharding

Usage Examples

Running CI Locally

# Mirror the static job locally
pnpm install
pnpm ci:static           # lint, typecheck, format check
pnpm test:unit            # unit tests
pnpm test:admin           # admin console tests
pnpm guard:perms          # permission-mode guard
pnpm test:release         # release fixture tests
pnpm test:protocol        # protocol regressions (requires Python/TS fixtures)
pnpm test:e2e:shardable   # E2E tests (sharded in CI)

Invoking as Reusable Workflow with Release Gate

# In a calling workflow:
jobs:
  ci:
    uses: ./.github/workflows/test-and-validate.yml
    with:
      checkout_ref: ${{ needs.candidate.outputs.release_sha }}
      release_gate: true
    permissions:
      contents: read

Related Pages

Page Connections

Double-click a node to navigate. Hold to expand connections.
Principle
Implementation
Heuristic
Environment