mirror of
https://github.com/wiosna-dev/common-library.git
synced 2026-03-12 01:31:45 +01:00
Reorganize documentation & update Readme
This commit is contained in:
@@ -1,33 +1,63 @@
|
|||||||
# Meritoo Common Library
|
# Meritoo Common Library
|
||||||
Development-related information
|
Development-related information
|
||||||
|
|
||||||
|
# Requirements
|
||||||
|
|
||||||
|
* [Docker](https://www.docker.com)
|
||||||
|
* Your favourite IDE :)
|
||||||
|
|
||||||
# Getting started
|
# 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
|
2. Install packages by running command:
|
||||||
docker-compose up -d
|
|
||||||
```
|
```bash
|
||||||
|
docker-compose run composer install
|
||||||
|
```
|
||||||
|
|
||||||
> [What is Docker?](https://www.docker.com/what-docker)
|
> [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
|
```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
|
```bash
|
||||||
docker-compose run composer update
|
docker-compose exec php-cli phpunit
|
||||||
```
|
```
|
||||||
|
|
||||||
### Tests
|
# Other
|
||||||
|
|
||||||
Rebuild project and run tests by running command:
|
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
|
docker-compose exec php-cli phing
|
||||||
```
|
```
|
||||||
|
|
||||||
Run tests only by running command:
|
|
||||||
|
|
||||||
```bash
|
|
||||||
docker-compose exec php-cli phpunit
|
|
||||||
```
|
|
||||||
|
|
||||||
[‹ Back to `Readme`](../README.md)
|
[‹ Back to `Readme`](../README.md)
|
||||||
|
|||||||
Reference in New Issue
Block a user