Skip to content

zolo-mario/zerkin

Repository files navigation

Zerkin CI

Zerkin is a lightweight CI tool designed for single developer workflows. It's a Python standalone application that runs on Windows and macOS, featuring code-driven CI pipelines and a dual-mode architecture.

Features

  • Code-driven CI pipelines: Define your CI pipelines using Python code
  • Dual-mode architecture:
    • Server mode: Resource scheduling and task distribution
    • Client mode: Task execution and result reporting
  • Daemon process: Background monitoring and automatic updates
  • Cross-platform: Runs on Windows and macOS
  • Lightweight: Minimal dependencies, standalone deployment

Quick Start

Installation

# Install from source
git clone <repository-url>
cd zerkin
pip install -e .

Basic Usage

# Show help
zerkin --help

# Start in server mode
zerkin server --host 0.0.0.0 --port 8080

# Start in client mode
zerkin client --server-host 127.0.0.1 --workspace ./workspace

# Start daemon process
zerkin daemon

# Configuration management
zerkin config init           # Create default config file
zerkin config show          # Show current configuration

Configuration

Create a configuration file:

zerkin config init --output zerkin.yaml

Example configuration:

server:
  host: "127.0.0.1"
  port: 8080
  max_workers: 4
  task_timeout: 3600

client:
  server_host: "127.0.0.1"
  server_port: 8080
  heartbeat_interval: 30
  max_concurrent_tasks: 2
  workspace_dir: "./workspace"

daemon:
  check_interval: 60
  auto_update: true
  github_repo: ""
  log_retention_days: 7

logging:
  level: "INFO"
  file_path: null
  max_file_size: 10485760
  backup_count: 5

Development

Setup Development Environment

# Clone repository
git clone <repository-url>
cd zerkin

# Install in development mode with dev dependencies
pip install -e .[dev]

# Install pre-commit hooks
pre-commit install

Running Tests

# Run all tests
pytest

# Run with coverage
pytest --cov=src/zerkin --cov-report=html

# Run specific test file
pytest tests/unit/test_config.py

# Run with verbose output
pytest -v

Code Quality

# Format code
black src/ tests/

# Lint code
ruff src/ tests/

# Type checking
mypy src/

# Run all quality checks
pre-commit run --all-files

Architecture

Zerkin uses a distributed client-server architecture:

  • Main Process: Can run in either server or client mode
  • Server Mode: Handles task scheduling, resource management, and API endpoints
  • Client Mode: Executes tasks and reports results back to server
  • Daemon Process: Monitors main processes and handles auto-updates

Project Structure

zerkin/
├── src/zerkin/
│   ├── core/           # Core modules (config, logging, exceptions)
│   ├── server/         # Server mode components
│   ├── client/         # Client mode components
│   ├── daemon/         # Daemon process
│   ├── pipeline/       # Pipeline engine and DSL
│   └── utils/          # Utility functions
├── tests/
│   ├── unit/           # Unit tests
│   └── integration/    # Integration tests
└── docs/               # Documentation

About

No description, website, or topics provided.

Resources

Stars

Watchers

Forks

Releases

No releases published

Packages

 
 
 

Contributors