Skip to content

Chore: update everything #17

Chore: update everything

Chore: update everything #17

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 }}
strategy:
fail-fast: false
matrix:
include:
- php: '7.4'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update --prefer-lowest'
extensions: ''
- php: '8.0'
output: '-o default'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
extensions: ''
- php: '8.1'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
extensions: ''
- php: '8.2'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
extensions: ''
- php: '8.3'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
extensions: ''
- php: '8.4'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
extensions: ''
- php: '8.5'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
extensions: ''
- php: '8.5'
phpcq_install: 'update'
phpcq_flags: ''
composer_install: 'update'
extensions: 'gnupg'
steps:
- name: PHP ${{ matrix.php }} Pull source
uses: actions/checkout@v6
with:
fetch-depth: 0
# see https://github.com/shivammathur/setup-php
- name: PHP ${{ matrix.php }} Setup PHP.
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: ${{ matrix.extensions }}
- name: PHP ${{ matrix.php }} Cache composer cache directory
uses: actions/cache@v5
env:
cache-name: composer-cache-dir-${{ matrix.php }}-${{ matrix.composer_install }}
with:
path: ~/.cache/composer
key: ${{ runner.os }}-build-${{ env.cache-name }}
- name: PHP ${{ matrix.php }} Cache vendor directory
uses: actions/cache@v5
env:
cache-name: composer-vendor-${{ matrix.php }}-${{ matrix.composer_install }}
with:
path: vendor
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: PHP ${{ matrix.php }} Cache phpcq directory
uses: actions/cache@v5
env:
cache-name: phpcq-dir-${{ matrix.php }}-${{ matrix.phpcq_install }}-${{ matrix.phpcq_flags }}
with:
path: |
.phpcq/gnupg/
.phpcq/plugins/
key: ${{ runner.os }}-build-${{ env.cache-name }}-${{ hashFiles('**/.phpcq.lock') }}
restore-keys: |
${{ runner.os }}-build-${{ env.cache-name }}-
- name: PHP ${{ matrix.php }} Install composer dependencies
run: composer ${{ matrix.composer_install }} --prefer-stable --no-interaction --no-progress
- name: PHP ${{ matrix.php }} Update phpcq
run: ./vendor/bin/phpcq self-update --unsigned
- name: PHP ${{ matrix.php }} Install phpcq toolchain
run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v
- name: PHP ${{ matrix.php }} Run tests
run: ./vendor/bin/phpcq run -v -o github-action -o default ${{ matrix.phpcq_flags }}
- name: PHP ${{ matrix.php }} Upload build directory to artifact
uses: actions/upload-artifact@v6
if: success() || failure()
with:
name: phpcq-builds-php-${{ matrix.php }}-${{ matrix.extensions }}-${{ matrix.phpcq_install }}-${{ matrix.phpcq_flags }}-${{ matrix.composer_install }}
path: .phpcq/build/