Skip to content

Fix output parsing

Fix output parsing #20

Workflow file for this run

name: Code Quality Diagnostics
on:
pull_request:
push:
branches:
- master
jobs:
build:
runs-on: ubuntu-latest
name: PHP ${{ matrix.php }} - composer ${{ matrix.composer_install }}
strategy:
fail-fast: false
matrix:
include:
- php: '7.4'
phpcq_install: 'install'
phpcq_flags: ''
composer_install: 'update --prefer-lowest'
- php: '8.0'
phpcq_install: 'update --prefer-lowest'
phpcq_flags: ''
composer_install: 'update'
- php: '8.1'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
- php: '8.2'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
- php: '8.3'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
steps:
- name: Pull source
uses: actions/checkout@v4
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
- name: Cache composer cache directory
uses: actions/cache@v4
env:
cache-name: composer-cache-dir-${{ matrix.php }}-${{ matrix.composer_install }}
with:
path: ~/.cache/composer
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: Install composer dependencies
run: composer install
- name: Cache vendor directory
uses: actions/cache@v4
env:
cache-name: vendor-${{ matrix.php }}
with:
path: vendor
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Install phpcq toolchain
run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v
- name: Cache phpcq directory
uses: actions/cache@v4
env:
cache-name: phpcq-${{ matrix.php }}
with:
path: .phpcq
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/.phpcq.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: Run tests
run: ./vendor/bin/phpcq run -v ${{ matrix.output }}
- name: Upload build directory to artifact
uses: actions/upload-artifact@v4
if: ${{ success() }} || ${{ failure() }}
with:
name: phpcq-builds-php-${{ matrix.php }}-${{ matrix.phpcq_install }}-${{ matrix.phpcq_flags }}-${{ matrix.composer_install }}
path: .phpcq/build/