Skip to content

Commit

Permalink
Add php action workflow
Browse files Browse the repository at this point in the history
  • Loading branch information
nilmerg committed Aug 30, 2023
1 parent fc7bfe7 commit 885a9ba
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions .github/workflows/php.yml
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() }}

0 comments on commit 885a9ba

Please sign in to comment.