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

Commit 4a10f4e

Browse files
committed
Merge pull request #500 from localheinz/feature/makefile
Enhancement: Add Makefile with cs and test targets
2 parents 3ee0cfc + 34168ff commit 4a10f4e

File tree

2 files changed

+20
-4
lines changed

2 files changed

+20
-4
lines changed

CONTRIBUTING.md

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -16,10 +16,10 @@ locally rather than keeping Travis busy doing it. There's not much more pleasing
1616

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

19-
Before opening a pull request or pushing more commits, you should run coding style checks locally:
20-
19+
Before opening a pull request or pushing more commits, fix coding style issues locally:
20+
2121
```
22-
$ ./vendor/bin/php-cs-fixer fix --config-file=./.php_cs --dry-run --diff -v
22+
$ make cs
2323
```
2424

2525

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

3232
```
33-
$ ./vendor/bin/phpunit --configuration phpunit.xml
33+
$ make test
3434
```
3535

3636
## Contributors

Makefile

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,16 @@
1+
.PHONY: composer cs
2+
3+
composer:
4+
composer validate
5+
composer install --prefer-dist
6+
7+
cs: composer
8+
vendor/bin/php-cs-fixer fix --config-file=.php_cs --diff --verbose
9+
10+
test: composer
11+
cp config/autoload/travis.php.local.dist config/autoload/travis.local.php
12+
mysql -uroot -e 'DROP DATABASE IF EXISTS modules_test;'
13+
mysql -uroot -e 'CREATE DATABASE modules_test;'
14+
mysql -uroot modules_test < data/sql/0.sql
15+
vendor/bin/phpunit --configuration phpunit.xml
16+
rm config/autoload/travis.local.php

0 commit comments

Comments
 (0)