Skip to content
This repository has been archived by the owner on May 1, 2019. It is now read-only.

Commit

Permalink
Merge pull request #500 from localheinz/feature/makefile
Browse files Browse the repository at this point in the history
Enhancement: Add Makefile with cs and test targets
  • Loading branch information
Ocramius committed Sep 19, 2015
2 parents 3ee0cfc + 34168ff commit 4a10f4e
Show file tree
Hide file tree
Showing 2 changed files with 20 additions and 4 deletions.
8 changes: 4 additions & 4 deletions CONTRIBUTING.md
Original file line number Diff line number Diff line change
Expand Up @@ -16,10 +16,10 @@ locally rather than keeping Travis busy doing it. There's not much more pleasing

This projects follows the [PSR-2 Coding Style Guide](http://www.php-fig.org/psr/psr-2/). Be sure to read it!

Before opening a pull request or pushing more commits, you should run coding style checks locally:
Before opening a pull request or pushing more commits, fix coding style issues locally:

```
$ ./vendor/bin/php-cs-fixer fix --config-file=./.php_cs --dry-run --diff -v
$ make cs
```


Expand All @@ -30,7 +30,7 @@ We do have a - somewhat - limited test suite, but are hoping for more.
Please run the tests locally to see if they pass:

```
$ ./vendor/bin/phpunit --configuration phpunit.xml
$ make test
```

## Contributors
Expand Down
16 changes: 16 additions & 0 deletions Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,16 @@
.PHONY: composer cs

composer:
composer validate
composer install --prefer-dist

cs: composer
vendor/bin/php-cs-fixer fix --config-file=.php_cs --diff --verbose

test: composer
cp config/autoload/travis.php.local.dist config/autoload/travis.local.php
mysql -uroot -e 'DROP DATABASE IF EXISTS modules_test;'
mysql -uroot -e 'CREATE DATABASE modules_test;'
mysql -uroot modules_test < data/sql/0.sql
vendor/bin/phpunit --configuration phpunit.xml
rm config/autoload/travis.local.php

0 comments on commit 4a10f4e

Please sign in to comment.