Skip to content

Commit d75cf73

Browse files
committed
Replace old run.sh with simpler Makefile
1 parent 0e12206 commit d75cf73

File tree

3 files changed

+23
-100
lines changed

3 files changed

+23
-100
lines changed

.docker/Makefile

Lines changed: 22 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,22 @@
1+
VERSIONS = php-5.6 php-7.0 php-7.1 nightly
2+
3+
all: build test clean
4+
5+
build:
6+
@echo ">> building images"
7+
docker-compose build
8+
9+
test:
10+
@- $(foreach version,$(VERSIONS), \
11+
echo ">> run tests with $(version)"; \
12+
docker-compose run --rm $(version) php bin/security-checker.phar security:check ./composer.lock --end-point=http://security.sensiolabs.org/check_lock; \
13+
docker-compose run --rm $(version) php bin/phpcs.phar --standard=PSR2 ./src -v; \
14+
docker-compose run --rm $(version) php bin/phpmd.phar ./src text ./phpmd.xml; \
15+
docker-compose run --rm $(version) php bin/phpcpd.phar ./src; \
16+
docker-compose run --rm $(version) php bin/phpunit.phar; \
17+
printf "\033c"; \
18+
)
19+
20+
clean:
21+
@echo ">> cleanup"
22+
docker-compose rm -f &>/dev/null

.docker/README.md

Lines changed: 1 addition & 26 deletions
Original file line numberDiff line numberDiff line change
@@ -10,32 +10,7 @@ To avoid development failures you can use this tiny suite which executes all nee
1010
## Usage
1111

1212
```
13-
$ chmod +x ./run.sh
14-
$ ./run.sh
15-
```
16-
17-
## Example output
18-
19-
On success
20-
21-
```
22-
Run checks with PHP 5.6.25 [ INFO ]
23-
Run security-checker [ OK ]
24-
Check PSR2 codestyle [ OK ]
25-
Run copy paste detection [ OK ]
26-
Run tests [ OK ]
27-
Run checks with PHP 7.0.10 [ INFO ]
28-
Run security-checker [ OK ]
29-
...
30-
```
31-
32-
or on failure:
33-
34-
```
35-
Run checks with PHP 5.6.25 [ INFO ]
36-
Run security-checker [ OK ]
37-
Check PSR2 codestyle [ FAIL ]
38-
Failed command: docker-compose run php-5.6 php bin/phpcs.phar --standard=PSR2 ./src -v[ FAIL ]
13+
$ make
3914
```
4015

4116
## Source

.docker/run.sh

Lines changed: 0 additions & 74 deletions
This file was deleted.

0 commit comments

Comments
 (0)