Skip to main content

A CLI tool to generate customized GitHub Actions workflow files

Project description

GitHub Actions Generator

Un outil CLI pour générer des workflows GitHub Actions personnalisés et standardisés.

Description

GitHub Actions Generator automatise la création de fichiers YAML pour GitHub Actions. Il permet de standardiser et d'accélérer la mise en place des pipelines CI/CD pour différents environnements techniques (Data Science, Django, Laravel, React).

Installation

Prérequis

  • Python 3.10 ou supérieur
  • pip

Installation

# Cloner le repository
git clone https://github.com/Juan-Lucas/github-actions-generator.git
cd github-actions-generator

# Installer
pip install -e .

Utilisation

Créer un workflow

gha-gen create --type <template> --name <nom-projet> [OPTIONS]

Options:

  • --type : Type de template (data-science, django-api, laravel-api, react-app)
  • --name : Nom du projet
  • --python-version : Version de Python (défaut: 3.11)
  • --php-version : Version de PHP (défaut: 8.2)
  • --node-version : Version de Node.js (défaut: 18)
  • --output : Répertoire de sortie (défaut: .github/workflows)

Exemples:

# Workflow Data Science
gha-gen create --type data-science --name mon-projet-ml

# Workflow Django avec Python 3.10
gha-gen create --type django-api --name api-backend --python-version 3.10

# Workflow Laravel
gha-gen create --type laravel-api --name laravel-backend

# Workflow React avec Node.js 20
gha-gen create --type react-app --name frontend-app --node-version 20

Autres commandes

# Lister les templates disponibles
gha-gen list-templates

# Valider un workflow existant
gha-gen validate --file .github/workflows/ci.yml

Templates disponibles

data-science

Projets Data Science, Machine Learning, Notebooks Jupyter
Inclut: Setup Python, linting (Ruff, Black, Flake8), tests pytest, validation notebooks

django-api

Applications Django, API Django REST Framework
Inclut: Setup Python, PostgreSQL, migrations Django, tests pytest-django, linting

laravel-api

Applications Laravel, API PHP
Inclut: Setup PHP, MySQL, Composer, tests PHPUnit, linting PHP CodeSniffer

react-app

Applications React, Next.js, Node.js frontend
Inclut: Setup Node.js, ESLint, Prettier, tests Jest, build production

Tests

# Exécuter les tests
pytest

# Avec coverage
pytest --cov=gha_generator

69 tests, 84% de couverture

Contribution

  1. Fork le projet
  2. Créer une branche (git checkout -b feature/nouvelle-fonctionnalite)
  3. Installer en mode dev (pip install -e .)
  4. Développer et tester (pytest)
  5. Commit (git commit -m 'feat: nouvelle fonctionnalité')
  6. Push et ouvrir une Pull Request

Licence

Ce projet est sous licence MIT. Voir le fichier LICENSE pour plus de détails.

Auteur

Jean-Luc Mupasa
@Juan-Lucas

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

gha_generator-0.1.0.tar.gz (14.3 kB view details)

Uploaded Source

Built Distribution

If you're not sure about the file name format, learn more about wheel file names.

gha_generator-0.1.0-py3-none-any.whl (15.5 kB view details)

Uploaded Python 3

File details

Details for the file gha_generator-0.1.0.tar.gz.

File metadata

  • Download URL: gha_generator-0.1.0.tar.gz
  • Upload date:
  • Size: 14.3 kB
  • Tags: Source
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for gha_generator-0.1.0.tar.gz
Algorithm Hash digest
SHA256 e7daefceea6941a0646b010e2b4f3f9c202ad147bfe2d0738bf40d54d56cb041
MD5 5653f0eb290932397baf88ae02f36a15
BLAKE2b-256 dedcc9502bcb5fe203d41a2b307e3db1eea0505ff7fe4cc21183b6c5485b719d

See more details on using hashes here.

File details

Details for the file gha_generator-0.1.0-py3-none-any.whl.

File metadata

  • Download URL: gha_generator-0.1.0-py3-none-any.whl
  • Upload date:
  • Size: 15.5 kB
  • Tags: Python 3
  • Uploaded using Trusted Publishing? No
  • Uploaded via: twine/6.2.0 CPython/3.11.11

File hashes

Hashes for gha_generator-0.1.0-py3-none-any.whl
Algorithm Hash digest
SHA256 88f12de4cbd80455c2e15a8ce698781395ff313405492c6f3ef1cf48554136d4
MD5 9be24993ea232d6eba68c741efcb0023
BLAKE2b-256 099e57127690f65c43965dcb021f9ec7fc8b6b15b6b24411f5398610db93ef0f

See more details on using hashes here.

Supported by

AWS Cloud computing and Security Sponsor Datadog Monitoring Depot Continuous Integration Fastly CDN Google Download Analytics Pingdom Monitoring Sentry Error logging StatusPage Status page