Skip to content

CI/CD & Testing

Odoofly is built with continuous integration in mind. Every operational command supports --json for structured output and --yes for non-interactive execution.

Local Development

poetry install
poetry run ruff check src/
poetry run mypy src/
poetry run pytest --cov=src/ --cov-report=term-missing

Pre-commit hooks (ruff linter + formatter) are configured in .pre-commit-config.yaml.

CI Pipeline

Odoofly uses GitHub Actions for CI:

# .github/workflows/tests.yml
# Trigger: push/PR to main or unstable
# Matrix: Python 3.10, 3.11, 3.12
# Steps: ruff lint -> mypy type-check -> pytest --cov

Automation Examples

# Headless setup
of setup init --author "CI" --image odoo --version 18.0 --email bots@agency.com --yes --json
of setup dashboard --yes --json

# CI/CD: Create and deploy
of project new --name project_x --author "CI" --image odoo --version 18.0 --yes
of project init --json
of env new --name staging --image odoo --version 18.0 --yes --json

# Operations
of env up main --json
of env down main --json
of env logs main --tail 300 --json

# Database cloning + neutralization
of db cpn main production development --json

# Backup automation
of env backup new main odoo --json
of env restore main /path/to/backup.zip --yes --json

# Password reset
of env password main odoo admin --random --json

JSON Output Example

# of project ls --json
[
  {
    "name": "client1",
    "image": "odoofly-client1-main:latest",
    "port": "10001",
    "working_dir": "/home/user/ofprojects/client1",
    "status": "running",
    "environments": [
      {"name": "main", "type": "dev", "url": "http://localhost:10001"}
    ]
  }
]