Jump to content

Connect SuperML | Leeroopedia MCP: Equip your AI agents with best practices, code verification, and debugging knowledge. Powered by Leeroo — building Organizational Superintelligence. Contact us at founders@leeroo.com.

Implementation:Microsoft Autogen CI Checks Workflow

From Leeroopedia
Knowledge Sources
Domains CI_CD, Build_Automation, Testing
Last Updated 2026-02-11 17:00 GMT

Overview

A comprehensive GitHub Actions workflow that runs code quality checks, linting, type checking, and tests for the Python packages in the AutoGen repository.

Description

This workflow implements continuous integration checks for the AutoGen Python codebase. It runs on every push and pull request to the main and staging branches, executing multiple parallel jobs including code formatting verification, linting, static type checking with both mypy and pyright, unit testing with coverage reporting, and documentation validation. The workflow uses UV package manager for dependency management and Poetry for task execution (poe).

Usage

This workflow automatically triggers on:

  • Push events to main or staging branches
  • Pull requests targeting main or staging branches

It validates code quality before merging changes to ensure consistency and prevent regressions across multiple Python packages (autogen-core, autogen-ext, autogen-agentchat, agbench, magentic-one-cli).

Code Reference

Source Location

Signature

name: Checks
on:
  push:
    branches: [main, staging]
  pull_request:
    branches: [main, staging]

jobs:
  format: # Code formatting check
  lint: # Linting check
  mypy: # Type checking with mypy
  docs-mypy: # Documentation type checking
  pyright: # Type checking with pyright
  test: # Unit tests with coverage
  test-grpc: # gRPC-specific tests
  test-autogen-ext-pwsh: # Windows PowerShell tests
  codecov: # Coverage reporting
  docs: # Documentation build check
  docs-example-check: # Example validation
  samples-code-check: # Sample code validation
  markdown-code-lint: # Markdown lint
  check-proto-changes-python: # Protocol buffer validation

Import

# Triggered by: Git push or pull request events on main/staging branches
# Uses: astral-sh/setup-uv@v5 for UV package manager
# Uses: actions/setup-python@v5 for Python 3.11
# Uses: codecov/codecov-action@v5 for coverage upload

I/O Contract

Inputs

Name Type Required Description
github.ref string Yes The branch reference triggering the workflow
github.workspace string Yes The GitHub workspace directory path
secrets.CODECOV_TOKEN string Yes Token for uploading coverage to Codecov

Outputs

Name Type Description
Test Results Status Pass/fail status for all check jobs
Coverage Reports Artifacts XML coverage files uploaded to Codecov
Build Logs Logs Detailed logs for each job execution

Usage Examples

Automatic Trigger on Push

# Automatically runs when code is pushed to main or staging:
git push origin main
# Workflow executes all 14 jobs in parallel where possible

Automatic Trigger on Pull Request

# Automatically runs when PR is created targeting main or staging:
gh pr create --base main --head feature-branch
# All checks must pass before merging is allowed

Manual Workflow Inspection

# View workflow status:
gh run list --workflow=checks.yml

# View specific run details:
gh run view <run-id>

# Download coverage artifacts:
gh run download <run-id>

Job Details

Format Job

Verifies code formatting using poe fmt --check. Ensures all Python code follows consistent formatting standards.

Lint Job

Runs poe lint to check code quality and identify potential issues using configured linters.

Mypy Job

Performs static type checking across five packages using mypy. Runs in parallel using a matrix strategy for efficiency.

Pyright Job

Performs additional static type checking using pyright across the same five packages. Provides a second layer of type safety validation.

Test Jobs

Executes unit tests for autogen-core, autogen-ext, and autogen-agentchat packages. Includes specialized jobs for:

  • gRPC testing (Linux only)
  • Windows PowerShell testing (Windows-specific tests)
  • Coverage collection using XPlat Code Coverage

Codecov Job

Aggregates coverage reports from test jobs and uploads them to Codecov for tracking test coverage over time.

Documentation Jobs

Validates documentation builds correctly (docs), example code works (docs-example-check), sample code is valid (samples-code-check), and markdown is properly formatted (markdown-code-lint).

Proto Changes Job

Regenerates protocol buffer files and verifies they match committed versions, ensuring proto definitions are in sync with generated code.

Related Pages

Page Connections

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