Skip to content

Commit

Permalink
Replace old run.sh with simpler Makefile
Browse files Browse the repository at this point in the history
  • Loading branch information
tommy-muehle committed Jul 21, 2017
1 parent 0e12206 commit d75cf73
Show file tree
Hide file tree
Showing 3 changed files with 23 additions and 100 deletions.
22 changes: 22 additions & 0 deletions .docker/Makefile
Original file line number Diff line number Diff line change
@@ -0,0 +1,22 @@
VERSIONS = php-5.6 php-7.0 php-7.1 nightly

all: build test clean

build:
@echo ">> building images"
docker-compose build

test:
@- $(foreach version,$(VERSIONS), \
echo ">> run tests with $(version)"; \
docker-compose run --rm $(version) php bin/security-checker.phar security:check ./composer.lock --end-point=http://security.sensiolabs.org/check_lock; \
docker-compose run --rm $(version) php bin/phpcs.phar --standard=PSR2 ./src -v; \
docker-compose run --rm $(version) php bin/phpmd.phar ./src text ./phpmd.xml; \
docker-compose run --rm $(version) php bin/phpcpd.phar ./src; \
docker-compose run --rm $(version) php bin/phpunit.phar; \
printf "\033c"; \
)

clean:
@echo ">> cleanup"
docker-compose rm -f &>/dev/null
27 changes: 1 addition & 26 deletions .docker/README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,32 +10,7 @@ To avoid development failures you can use this tiny suite which executes all nee
## Usage

```
$ chmod +x ./run.sh
$ ./run.sh
```

## Example output

On success

```
Run checks with PHP 5.6.25 [ INFO ]
Run security-checker [ OK ]
Check PSR2 codestyle [ OK ]
Run copy paste detection [ OK ]
Run tests [ OK ]
Run checks with PHP 7.0.10 [ INFO ]
Run security-checker [ OK ]
...
```

or on failure:

```
Run checks with PHP 5.6.25 [ INFO ]
Run security-checker [ OK ]
Check PSR2 codestyle [ FAIL ]
Failed command: docker-compose run php-5.6 php bin/phpcs.phar --standard=PSR2 ./src -v[ FAIL ]
$ make
```

## Source
Expand Down
74 changes: 0 additions & 74 deletions .docker/run.sh

This file was deleted.

0 comments on commit d75cf73

Please sign in to comment.