Skip to content
This repository was archived by the owner on Jan 31, 2020. It is now read-only.

Commit 79d6bb9

Browse files
committed
Update: use Makefile
1 parent 46cbbe1 commit 79d6bb9

File tree

2 files changed

+15
-6
lines changed

2 files changed

+15
-6
lines changed

.travis.yml

Lines changed: 3 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -12,14 +12,11 @@ php:
1212
- 5.6
1313

1414
before_install:
15-
- composer self-update
1615
- if [[ "$TRAVIS_PHP_VERSION" != "5.3" && "$TRAVIS_PHP_VERSION" != "5.3.3" ]]; then composer require --no-update guzzlehttp/guzzle:~4; fi
17-
- composer install --prefer-source
18-
- wget http://cs.sensiolabs.org/get/php-cs-fixer.phar
1916

20-
script:
21-
- phpunit -c ./tests/ --coverage-text
22-
- output=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 .); if [[ $output ]]; then while read -r line; do echo -e "\e[00;31m$line\e[00m"; done <<< "$output"; false; fi;
17+
install: make install
18+
19+
script: make test
2320

2421
notifications:
2522
irc: "irc.freenode.org#zftalk.dev"

Makefile

Lines changed: 12 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,12 @@
1+
install:
2+
ifdef TRAVIS_PHP_VERSION
3+
composer self-update
4+
composer install --prefer-source
5+
else
6+
test -s ./composer.phar || { curl -sS https://getcomposer.org/installer | php }
7+
./composer.phar install --prefer-source
8+
endif
9+
10+
test:
11+
phpunit -c ./tests/ --coverage-text
12+
output=$(php php-cs-fixer.phar fix -v --dry-run --level=psr2 .); if [[ $output ]]; then while read -r line; do echo -e "\e[00;31m$line\e[00m"; done <<< "$output"; false; fi;

0 commit comments

Comments
 (0)