Jelajahi Sumber

[CI] Force php -l failure (#2363)

* [CI] Force php -l failure

By redirecting stderr to a file and checking if the filesize is greater than 0 bytes, we can also force failure for warnings.

See discussion in <https://github.com/FreshRSS/FreshRSS/pull/2362#issuecomment-480623161>.

* exclude JSON lib
Frans de Jonge 7 tahun lalu
induk
melakukan
1bf8ef4e32
1 mengubah file dengan 2 tambahan dan 1 penghapusan
  1. 2 1
      .travis.yml

+ 2 - 1
.travis.yml

@@ -14,7 +14,8 @@ install:
 
 
 script:
 script:
   - phpenv rehash
   - phpenv rehash
-  - git ls-files -z "*.php" | xargs -0 -n1 -P4 php -l
+  - find . -not -path "./lib/JSON.php" -name \*.php -print0 | xargs -0 -n1 -P4 php -l 1>/dev/null 2>php-l-results
+  - if [ -s php-l-results ]; then cat php-l-results; exit 1; fi
   - |
   - |
     if [[ $VALIDATE_STANDARD == yes ]]; then
     if [[ $VALIDATE_STANDARD == yes ]]; then
       COMPOSER_BIN=$(composer global config --absolute bin-dir)
       COMPOSER_BIN=$(composer global config --absolute bin-dir)