mirror of
https://github.com/Icinga/icingadb-web.git
synced 2026-05-28 04:36:06 -04:00
Add php action workflow
This commit is contained in:
parent
eb3edf4d1e
commit
d839784ded
1 changed files with 47 additions and 0 deletions
47
.github/workflows/php.yml
vendored
Normal file
47
.github/workflows/php.yml
vendored
Normal 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
|
||||
Loading…
Reference in a new issue