A Python-native CI/CD framework for defining, testing, and transpiling pipelines.
Project description
A Python-native CI/CD framework for defining, testing, and transpiling pipelines to GitHub Actions.
Example: Define a CI Pipeline with pygha
Below is an example of a Python-defined pipeline that mirrors what most teams use in production —
build, lint, test, coverage, and deploy — all orchestrated through pygha.
from pygha import job, default_pipeline
from pygha.steps import shell, checkout
# Define a default pipeline that triggers on main and dev branches,
# and on pull requests to main.
default = default_pipeline(
on_push=['main', 'dev'],
on_pull_request='main'
)
@job(name='lint')
def lint():
"""Static analysis and style checks."""
checkout()
shell('pip install -U pip ruff mypy')
shell('ruff check .')
shell('mypy src')
@job(name='build', depends_on=['lint'])
def build():
"""Build the package."""
checkout()
shell('pip install -U build')
shell('python -m build')
@job(name='test', depends_on=['build'])
def test():
"""Run unit tests with coverage."""
checkout()
shell('pip install -e .[dev]')
shell('pytest --cov=src --cov-report=xml')
@job(name='deploy', depends_on=['test'])
def deploy():
"""Deploy to PyPI when pushing a tagged release."""
checkout()
shell('pip install twine')
shell('if [[ "$GITHUB_REF" == refs/tags/* ]]; then twine upload dist/*; fi')
Project details
Download files
Download the file for your platform. If you're not sure which to choose, learn more about installing packages.
Source Distribution
Built Distribution
Filter files by name, interpreter, ABI, and platform.
If you're not sure about the file name format, learn more about wheel file names.
Copy a direct link to the current filters
File details
Details for the file pygha-0.1.0.tar.gz.
File metadata
- Download URL: pygha-0.1.0.tar.gz
- Upload date:
- Size: 42.6 kB
- Tags: Source
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
b0286bd2e2d99317eee3a7a807a3db5b243ddc6037305f4a35d8274753367c2f
|
|
| MD5 |
50e1464fb2d25651d4aff8c970dcbd5c
|
|
| BLAKE2b-256 |
177c35495b566c372fc6f86a7f0c83a7ec97b71a3f73470cf70d6b306905737f
|
Provenance
The following attestation bundles were made for pygha-0.1.0.tar.gz:
Publisher:
publish_pypi.yml on parneetsingh022/pygha
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygha-0.1.0.tar.gz -
Subject digest:
b0286bd2e2d99317eee3a7a807a3db5b243ddc6037305f4a35d8274753367c2f - Sigstore transparency entry: 708317028
- Sigstore integration time:
-
Permalink:
parneetsingh022/pygha@162b97870da5a42f5cf4c006aada3ff7b41b397d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/parneetsingh022
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yml@162b97870da5a42f5cf4c006aada3ff7b41b397d -
Trigger Event:
push
-
Statement type:
File details
Details for the file pygha-0.1.0-py3-none-any.whl.
File metadata
- Download URL: pygha-0.1.0-py3-none-any.whl
- Upload date:
- Size: 13.3 kB
- Tags: Python 3
- Uploaded using Trusted Publishing? Yes
- Uploaded via: twine/6.1.0 CPython/3.13.7
File hashes
| Algorithm | Hash digest | |
|---|---|---|
| SHA256 |
ffad594cbf9eda9b3a8c48f97f3530c71aec44994c41f1d69e11007b94447fa3
|
|
| MD5 |
4c6842125ce1b06f72bbd1a2c59a45f1
|
|
| BLAKE2b-256 |
617e8c38f7aca81695c47120ccf9ba67f37059a1e026ca8fb9c73c335cb5b516
|
Provenance
The following attestation bundles were made for pygha-0.1.0-py3-none-any.whl:
Publisher:
publish_pypi.yml on parneetsingh022/pygha
-
Statement:
-
Statement type:
https://in-toto.io/Statement/v1 -
Predicate type:
https://docs.pypi.org/attestations/publish/v1 -
Subject name:
pygha-0.1.0-py3-none-any.whl -
Subject digest:
ffad594cbf9eda9b3a8c48f97f3530c71aec44994c41f1d69e11007b94447fa3 - Sigstore transparency entry: 708317031
- Sigstore integration time:
-
Permalink:
parneetsingh022/pygha@162b97870da5a42f5cf4c006aada3ff7b41b397d -
Branch / Tag:
refs/tags/v0.1.0 - Owner: https://github.com/parneetsingh022
-
Access:
public
-
Token Issuer:
https://token.actions.githubusercontent.com -
Runner Environment:
github-hosted -
Publication workflow:
publish_pypi.yml@162b97870da5a42f5cf4c006aada3ff7b41b397d -
Trigger Event:
push
-
Statement type: