From 3726a26e4732974a04e518b4414547fcc5a6e46c Mon Sep 17 00:00:00 2001 From: Meritoo Date: Thu, 14 Jun 2018 21:32:18 +0200 Subject: [PATCH] Reorganize documentation & update Readme --- docs/Development.md | 58 ++++++++++++++++++++++++++++++++------------- 1 file changed, 41 insertions(+), 17 deletions(-) diff --git a/docs/Development.md b/docs/Development.md index 35fa88c..d9adbd3 100644 --- a/docs/Development.md +++ b/docs/Development.md @@ -1,33 +1,63 @@ # Meritoo Common Library Development-related information +# Requirements + +* [Docker](https://www.docker.com) +* Your favourite IDE :) + # Getting started -### Docker +1. Build, create and start Docker's containers by running command: -Build, create and start Docker's containers by running command: + ```bash + docker-compose up -d + ``` -```bash -docker-compose up -d -``` +2. Install packages by running command: + + ```bash + docker-compose run composer install + ``` > [What is Docker?](https://www.docker.com/what-docker) -### Composer +# Tests -Install packages by running command: +### Prerequisites + +Install required packages by running command: `docker-compose run composer install`. + +### Running tests + +#### Simply & quick, without code coverage + +Tests are running using Docker and `php-cli` service defined in `docker-compose.yml`. Example: ```bash -docker-compose run composer install +docker-compose exec php-cli phpunit --no-coverage ``` -Update packages by running command: +You can also run them in container. In this case you have to run 2 commands: +1. Enter container: + + ```bash + docker-compose exec php-cli bash + ``` + +2. Run tests: + + ```bash + phpunit --no-coverage + ``` + +#### With code coverage ```bash -docker-compose run composer update +docker-compose exec php-cli phpunit ``` -### Tests +# Other Rebuild project and run tests by running command: @@ -35,10 +65,4 @@ Rebuild project and run tests by running command: docker-compose exec php-cli phing ``` -Run tests only by running command: - -```bash -docker-compose exec php-cli phpunit -``` - [‹ Back to `Readme`](../README.md)