recipe-runner/recipe-runner

1.0.0-alpha1 2019-09-17 15:01 UTC

This package is auto-updated.

Last update: 2022-06-17 05:24:51 UTC


README

Build Status Build status

Recipe Runner is a new way to automate tasks and extend your applications.

Requires

  • PHP +7.3

Installation

The preferred installation method is composer:

composer require recipe-runner/recipe-runner

Usage

use RecipeRunner\Definition\RecipeMaker;
use RecipeRunner\RecipeRunner\Recipe\StandardRecipeVariables;
use RecipeRunner\RecipeRunner\Setup\QuickStart;

$recipeVariables = StandardRecipeVariables::getCollectionOfVariables();

$recipeMaker = new YamlRecipeMaker();
$recipe = $recipeMaker->makeRecipeFromFile('/path-to-a-recipe.yml');

$recipeParser = QuickStart::Create();
$recipeParser->parse($recipe, $recipeVariables);

Recipe example

Recipes are written in YAML:

name: "Very simple example that creates variables"

steps:
  - actions:
    - register_variables:
        user: "victor"
        register: my_variables

Unit tests

You can run the unit tests with the following command:

$ cd recipe-runner
$ composer test

License

This library is open-sourced software licensed under the MIT license.