-
Notifications
You must be signed in to change notification settings - Fork 203
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,53 @@ | ||
name: PHP Tests | ||
|
||
on: | ||
push: | ||
branches: | ||
- master | ||
- release/* | ||
pull_request: | ||
branches: | ||
- master | ||
|
||
jobs: | ||
lint: | ||
name: Static analysis for php ${{ matrix.php }} on ${{ matrix.os }} | ||
runs-on: ${{ matrix.os }} | ||
|
||
strategy: | ||
fail-fast: false | ||
matrix: | ||
php: ['5.6', '7.0', '7.1', '7.2', '7.3', '7.4', '8.0', '8.1'] | ||
os: ['ubuntu-latest'] | ||
include: | ||
- php: '5.6' | ||
allow_failure: true | ||
- php: '7.0' | ||
allow_failure: true | ||
- php: '7.1' | ||
allow_failure: true | ||
|
||
steps: | ||
- name: Checkout code base | ||
uses: actions/checkout@v3 | ||
|
||
- name: Setup PHP | ||
uses: shivammathur/setup-php@v2 | ||
with: | ||
php-version: ${{ matrix.php }} | ||
tools: phpcs | ||
|
||
- name: Setup dependencies | ||
run: composer require -n --no-progress overtrue/phplint | ||
|
||
- name: PHP Lint | ||
if: ${{ ! cancelled() }} | ||
run: ./vendor/bin/phplint -n --exclude={^vendor/.*} -- . | ||
|
||
- name: PHP CodeSniffer | ||
if: ${{ ! cancelled() }} | ||
run: phpcs | ||
|
||
- name: PHPStan | ||
uses: php-actions/phpstan@v3 | ||
if: ${{ ! cancelled() }} |