Reorganize documentation & update Readme

This commit is contained in:
Meritoo
2018-06-14 21:32:18 +02:00
parent fb24bc2ff1
commit 3726a26e47

View File

@@ -1,33 +1,63 @@
# Meritoo Common Library
Development-related information
# Requirements
* [Docker](https://www.docker.com)
* Your favourite IDE :)
# Getting started
### Docker
Build, create and start Docker's containers by running command:
1. Build, create and start Docker's containers by running command:
```bash
docker-compose up -d
```
> [What is Docker?](https://www.docker.com/what-docker)
### Composer
Install packages by running command:
2. Install packages by running command:
```bash
docker-compose run composer install
```
Update packages by running command:
> [What is Docker?](https://www.docker.com/what-docker)
# Tests
### 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 update
docker-compose exec php-cli phpunit --no-coverage
```
### Tests
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 exec php-cli phpunit
```
# 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)