From 8ed6d1dd6cce8e2f5f4b258029cd1b1bb96e9d7f Mon Sep 17 00:00:00 2001 From: Alexey Skobkin Date: Mon, 12 Dec 2016 00:59:16 +0300 Subject: [PATCH] README.md updated: translation to English, tests, fixtures, Scrutinizer badges. --- README.md | 48 ++++++++++++++++++++++++++++++++++++------------ 1 file changed, 36 insertions(+), 12 deletions(-) diff --git a/README.md b/README.md index 3e777f3..0b731e1 100644 --- a/README.md +++ b/README.md @@ -1,26 +1,28 @@ [ ![Codeship Status for skobkin/point-tools](https://app.codeship.com/projects/bb9fe730-a175-0134-5572-12490b0b4938/status?branch=master)](https://app.codeship.com/projects/189850) +[![Scrutinizer Code Quality](https://scrutinizer-ci.com/b/skobkin/point-tools/badges/quality-score.png?b=master)](https://scrutinizer-ci.com/b/skobkin/point-tools/?branch=master) +[![Scrutinizer Code Coverage](https://scrutinizer-ci.com/b/skobkin/point-tools/badges/coverage.png?b=master)](https://scrutinizer-ci.com/b/skobkin/point-tools/?branch=master) [![codecov](https://codecov.io/bb/skobkin/point-tools/branch/master/graph/badge.svg)](https://codecov.io/bb/skobkin/point-tools) [![SensioLabsInsight](https://insight.sensiolabs.com/projects/a54ef130-5aed-44f5-9ea9-c404a3d8db6b/mini.png)](https://insight.sensiolabs.com/projects/a54ef130-5aed-44f5-9ea9-c404a3d8db6b) # Point Tools -Point Tools - это сервис предоставляющий дополнительные функции для блогов [Point.im](https://point.im/). +Point Tools is a service which provides additional features for [Point.im](https://point.im/) microblog users. -# Установка +# Installation -Установка сервиса довольно проста: +Application setup is quite simple: -## Получение исходников +## Getting the source code ```shell git clone https://skobkin@bitbucket.org/skobkin/point-tools.git cd point-tools ``` -## Выставление прав -Выставьте права на запись для директорий `app/cache` и `app/logs`. +## Setting file access privileges +Set up appropriate write privileges for `app/cache` and `app/logs`. -## Установка зависимостей +## Installing dependencies ```shell # В dev-среде: @@ -29,27 +31,27 @@ composer install composer install --no-dev --optimize-autoloader ``` -После установки зависимостей у вас будут запрошены реквизиты доступа к БД PostgreSQL и данные необходимые для функционирования сервиса. +After dependencies installation you will be asked for database credentials of PostgreSQL database and some other application parameters. -## Инициализация БД +## Database initialization ```shell php app/console doctrine:migrations:migrate ``` -## Установка ресурсов +## Web assets installation ```shell php app/console assets:install web --symlink ``` -## Добавление задания в CRON +## Adding CRON jobs ```shell crontab -e ``` -Вставьте в ваш файл crontab конфиг задания: +You can use following jobs as an example: ```crontab # point.skobk.in @@ -57,3 +59,25 @@ crontab -e 0 0 * * * /usr/bin/php /path/to/point-tools/app/console point:update:subscriptions --all-users --env=prod ``` +# Running tests + +## Configure environment variables + +```shell +export SYMFONY__TEST_DATABASE_USER=some_database_user +export SYMFONY__TEST_DATABASE_PASSWORD=some_database_password +export SYMFONY__TEST_DATABASE_NAME=some_database_name +export SYMFONY__TEST_DATABASE_PORT=postgresql_port +``` + +## Load fixtures (if needed) + +```shell +php app/console doctrine:fixtures:load --no-interaction +``` + +## Run tests + +```shell +phpunit -c app/ +``` \ No newline at end of file