master | heroku | < authorization prototype > | |
---|---|---|---|
TDD tests | |||
< Circle CI > PHPUnit | |||
BDD tests | |||
< Circle CI > Behat | |||
< Circle CI > Kahlan | |||
coverage | |||
< codecov.io > |
other CI engines reports [on master]
DEMO : https://battleship-game-api.herokuapp.com/ [out of sync with master, because front-end is not ready yet]
- to try out cutting edge technologies and services, modern approaches such as Test Automation, Continuous Integration{CI}|Deployment{CD}
- simulate database loading [~500 transactions per request]
- deliver preview about my technical knowledge before the job interview
- demonstrate technical knowledege level prior job interview
- AI players have only one ship[single-cell] which is located at B2 cell [purpose: easier manual testing]
- if you will hit B2 cell - you will win
- PHP 7.1
- one of supported database engines
- MySQL >= 5.5
- MariaDB >= 9.0
- PostgreSQL >= 9.3
- SQLite >= 3
- http server with CGI e.g. [example: apache, nginx]
- composer >= 1.0.3
- PHP 7.1
- Symfony Framework 3 [SF3]
- Doctrine 2 with Fixtures
- Composer
- JMS Serializer
- API Doc
- Twig
- PHPUnit 5
- Behat 3
- Kahlan
- json schema
- Front Controller
- MVC
- ORM
- Data Mapper
- Builder
- Strategy
- Factory
- Singleton
- Delegation
- Registry
- Service Locator
- Event Dispatcher
- Dependency Injection
- new functionality merged into master branch only via pull requests
- each pull request have callback to trigger CI engines such as Travis, Circle, CodeShip, Sensiolabs Insight, CodeCov
- result of each pull request is ready-to-use release - using Continuous Delivery principles
- master branch: stable source code, contains release-ready source
- heroku branch: reflects current deployed app at heroku [Continuous Deployment]
- prototype*_ branch: contains new idea [pull request of prototype branch is always next major version release]
- pull requests follows semantic vesion
$ composer install
to fetch dependencies and execute mandatory deployment steps- NOTE: composer is configured to generate parameters.yml using incenteev/composer-parameter-handler
- optional
$ composer dump-autoload --classmap-authoritative
to generate class-map autoloader
if you've ant installed locally, you can run all tests via shortcut command: $ ant test
or just $ ant
database_name_test in parameters.yml reflects database name for the test env.
test database need to be wiped and seeded prior tests execution (for PHPUnit tests only, Kahlan and Behat tests can be executed on 'dirty' database)
sequence of steps to prepare test database
$ php bin/console doctrine:database:create --env=test
$ php bin/console doctrine:migrations:migrate --env=test
$ php bin/console doctrine:fixtures:load --env=test
how to execute tests
$ php bin/phpunit -c .
or$ php bin/phpunit -c . --no-coverage
to disable coverage report$ php bin/behat
$ php bin/kahlan