In order to run tests locally please make sure you have docker up and running. You also need PHP 8.1 and composer to be available from your CLI. Even that we are supporting 3 PHP versions at time, we are using the lowest supported one for development, currently it's PHP 8.1.
For the code coverage, please install pcov.
cp compose.yml.dist compose.yml
composer install
docker compose up -d
composer test
composer static:analyze
Before committing your code, please make sure that your code is following our coding standards.
composer cs:php:fix
This command will execute exactly the same tests as we run at GitHub Actions before PR can get merged. If it passes locally, you are good to open pull request.
composer build
composer build:phar
./build/flow.phar --version
In order to build docker image and load it to local registry please use:
docker buildx build -t flow-php/flow:latest . --progress=plain --load
Usage:
docker run -v $(pwd):/flow-workspace -it flow-php/flow:latest --version