1. Go to this page and download the library: Download sandermuller/boost-pipeline library. Choose the download type require.
2. Extract the ZIP file and open the index.php.
3. Add this code to the index.php.
<?php
require_once('vendor/autoload.php');
/* Start to develop here. Best regards https://php-download.com/ */
sandermuller / boost-pipeline example snippets
declare(strict_types=1);
use SanderMuller\BoostPipeline\Config\Pipeline;
use SanderMuller\BoostPipeline\Phases\Defaults\{Refactoring, Formatting, Tests, Agent};
use SanderMuller\BoostPipeline\Phases\{StepCollection, Steps};
use SanderMuller\BoostPipeline\Steps\{Shell, Skill};
return Pipeline::configure()
->withSteps(function (Steps $steps): void {
$steps->in(Refactoring::class)
->append(Shell::run('vendor/bin/rector process --dry-run'));
// Neither of these feeds the other, so they share a position and run at once.
$steps->in(Formatting::class)
->parallel(function (StepCollection $steps): void {
$steps->append(Shell::run('vendor/bin/pint --test'));
$steps->append(Shell::run('yarn lint-all'));
});
$steps->in(Tests::class)->append(Shell::run('yarn test:js'));
$steps->in(Agent::class)
->append(Skill::run('/evaluate', instruction: 'Fix what the checks above reported.'));
});
return [
'pr' => Pipeline::configure()
->withPurpose('Confirm the branch is ready to review.')
->…,
'release' => Pipeline::configure()
->withPurpose('Confirm the tag is safe to publish.')
->…,
];