Skip to content

Commit

Permalink
Merge pull request #50 from glensc/parallel-lint
Browse files Browse the repository at this point in the history
Use parallel-lint for GitHub actions
  • Loading branch information
falkenhawk authored Jan 30, 2021
2 parents 1a8b636 + cf75c29 commit f029953
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 4 additions & 8 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,14 +39,6 @@ jobs:
ini-values: display_errors=off, log_errors=on
extensions: :xdebug, ctype, dom, gd, iconv, ldap, mbstring, reflection, session, simplexml, spl, xml, zlib, memcache, pdo_sqlite, bcmath

- name: Lint PHP source files
run: |
# Lint All PHP source files
# Remove source expected to have syntax error
git rm tests/Zend/Loader/_files/ParseError.php
git ls-files '**/*.php' | while read f; do php -l "$f" > /dev/null || touch failed && echo -n .; done
test ! -f failed
# https://github.com/zf1s/zf1/pull/6#issuecomment-495397170
- name: Validate composer.json for all packages
run: |
Expand All @@ -56,6 +48,10 @@ jobs:
- name: Install dependencies
run: composer install --prefer-dist --no-progress --no-suggest

- name: Lint PHP source files
run: |
composer lint
- name: Setup environment for PHPUnit
run: |
cp tests/TestConfiguration.ci.php tests/TestConfiguration.php
Expand Down
6 changes: 4 additions & 2 deletions composer.json
Original file line number Diff line number Diff line change
Expand Up @@ -18,8 +18,9 @@
"ext-zlib": "*"
},
"require-dev": {
"zf1s/phpunit": "3.7.39",
"phpunit/dbunit": "1.3.2"
"php-parallel-lint/php-parallel-lint": "1.0.0",
"phpunit/dbunit": "1.3.2",
"zf1s/phpunit": "3.7.39"
},
"autoload": {
"psr-0": {
Expand Down Expand Up @@ -203,6 +204,7 @@
"zf1s/zend-xmlrpc": "self.version"
},
"scripts": {
"lint": "parallel-lint --exclude vendor --exclude tests/Zend/Loader/_files/ParseError.php .",
"test": "phpunit"
}
}

0 comments on commit f029953

Please sign in to comment.