Add php action workflow

This commit is contained in:
Johannes Meyer 2020-01-17 10:26:08 +01:00
parent eb3edf4d1e
commit d839784ded

47
.github/workflows/php.yml vendored Normal file
View file

@ -0,0 +1,47 @@
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']
os: ['ubuntu-latest']
include:
- php: '5.6'
allow_failure: true
- php: '7.0'
allow_failure: true
steps:
- name: Checkout code base
uses: actions/checkout@v2
- name: Setup PHP
uses: shivammathur/setup-php@v1
with:
php-version: ${{ matrix.php }}
tools: composer, phpcs
- name: PHP Lint
if: success() || matrix.allow_failure
# continue-on-error: ${{ matrix.allow_failure }}
run: |
composer require -n --no-progress overtrue/phplint
./vendor/bin/phplint -n --exclude=vendor --no-ansi -- ./
- name: PHP CodeSniffer
if: success() || matrix.allow_failure
run: phpcs ./ --ignore=vendor/* --standard=PSR12