diff options
author | Jeremy Benoist <jeremy.benoist@gmail.com> | 2016-03-20 21:10:17 +0100 |
---|---|---|
committer | Jeremy Benoist <jbenoist@20minutes.fr> | 2016-03-21 10:00:41 +0100 |
commit | 4cb3ef5125599c2ffdb3745e973e713cc0d6b5dd (patch) | |
tree | c9f90d7baeed3351666facd60e4f7048c51a67e8 | |
parent | f92b5de7acad338389db2e07e36bc48970a9c248 (diff) | |
download | wallabag-4cb3ef5125599c2ffdb3745e973e713cc0d6b5dd.tar.gz wallabag-4cb3ef5125599c2ffdb3745e973e713cc0d6b5dd.tar.zst wallabag-4cb3ef5125599c2ffdb3745e973e713cc0d6b5dd.zip |
Put more validations on travis
Run php-cs-fixer to avoid CS on commits
Add a check on translation message using the built-in yaml validator. It'll avoid typo in translation yaml files.
-rw-r--r-- | .travis.yml | 6 | ||||
l--------- | bin/php-cs-fixer | 1 | ||||
-rw-r--r-- | composer.json | 3 |
3 files changed, 9 insertions, 1 deletions
diff --git a/.travis.yml b/.travis.yml index 5741b533..e2bf90ca 100644 --- a/.travis.yml +++ b/.travis.yml | |||
@@ -11,6 +11,7 @@ addons: | |||
11 | 11 | ||
12 | # cache vendor dirs | 12 | # cache vendor dirs |
13 | cache: | 13 | cache: |
14 | apt: true | ||
14 | directories: | 15 | directories: |
15 | - vendor | 16 | - vendor |
16 | - $HOME/.composer/cache | 17 | - $HOME/.composer/cache |
@@ -28,6 +29,9 @@ env: | |||
28 | 29 | ||
29 | matrix: | 30 | matrix: |
30 | fast_finish: true | 31 | fast_finish: true |
32 | include: | ||
33 | - php: 7.0 | ||
34 | env: CS_FIXER=run VALIDATE_TRANSLATION_FILE=run DB=sqlite | ||
31 | exclude: | 35 | exclude: |
32 | - php: hhvm | 36 | - php: hhvm |
33 | env: DB=pgsql # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency | 37 | env: DB=pgsql # driver for PostgreSQL currently unsupported by HHVM, requires 3rd party dependency |
@@ -53,3 +57,5 @@ script: | |||
53 | - travis_wait composer install --no-interaction --no-progress --prefer-dist -o | 57 | - travis_wait composer install --no-interaction --no-progress --prefer-dist -o |
54 | - ant prepare-$DB | 58 | - ant prepare-$DB |
55 | - bin/phpunit -v | 59 | - bin/phpunit -v |
60 | - if [ "$CS_FIXER" = "run" ]; then php bin/php-cs-fixer fix src/ --verbose --dry-run ; fi; | ||
61 | - if [ "$VALIDATE_TRANSLATION_FILE" = "run" ]; then php bin/console lint:yaml src/Wallabag/CoreBundle/Resources/translations ; fi; | ||
diff --git a/bin/php-cs-fixer b/bin/php-cs-fixer new file mode 120000 index 00000000..902e8f5f --- /dev/null +++ b/bin/php-cs-fixer | |||
@@ -0,0 +1 @@ | |||
../vendor/fabpot/php-cs-fixer/php-cs-fixer \ No newline at end of file | |||
diff --git a/composer.json b/composer.json index a1a7ebb4..1abf6f20 100644 --- a/composer.json +++ b/composer.json | |||
@@ -86,7 +86,8 @@ | |||
86 | "doctrine/doctrine-fixtures-bundle": "~2.2", | 86 | "doctrine/doctrine-fixtures-bundle": "~2.2", |
87 | "sensio/generator-bundle": "^3.0", | 87 | "sensio/generator-bundle": "^3.0", |
88 | "phpunit/phpunit": "~4.4", | 88 | "phpunit/phpunit": "~4.4", |
89 | "symfony/phpunit-bridge": "^2.7" | 89 | "symfony/phpunit-bridge": "^2.7", |
90 | "fabpot/php-cs-fixer": "~1.9" | ||
90 | }, | 91 | }, |
91 | "scripts": { | 92 | "scripts": { |
92 | "build-parameters": [ | 93 | "build-parameters": [ |