Examples
A uv-managed project: test (pytest), lint (ruff), fmt, and typecheck (mypy).
A uv-managed project: test (pytest), lint (ruff), fmt, and typecheck (mypy).
Project layout
.gitignore
pyproject.toml
README.md
uv.lock
Pipeline
"""Python (uv) example pipeline."""from __future__ import annotationsimport harmont as hmfrom harmont._python import PythonToolchain@hm.target()def project() -> PythonToolchain: return hm.python(path=".")@hm.pipeline( "ci", env={"CI": "true"}, default_image="ubuntu:24.04", triggers=[hm.push(branch="main")],)def ci(project: hm.Target[PythonToolchain]) -> tuple[hm.Step, ...]: return (project.test(), project.lint(), project.fmt(), project.typecheck())import { pipeline, push, type PipelineDefinition } from "@harmont/hm";import { python } from "@harmont/hm/toolchains";const project = python({ path: "." });const pipelines: PipelineDefinition[] = [ { slug: "ci", triggers: [push({ branch: "main" })], pipeline: pipeline( [project.test(), project.lint(), project.fmt(), project.typecheck()], { env: { CI: "true" }, defaultImage: "ubuntu:24.04" }, ), },];export default pipelines;Run it
hm run ci