Skip to content

Reduce psalm error level to 1 #9

Reduce psalm error level to 1

Reduce psalm error level to 1 #9

Workflow file for this run

name: Git php
on:
push:
pull_request:
jobs:
build:
runs-on: ubuntu-latest
name: 'PHP: ${{ matrix.php }} Symfony: ${{ matrix.symfony}} Experimental: ${{ matrix.experimental}}'
continue-on-error: ${{ matrix.experimental }}
strategy:
fail-fast: true
matrix:
include:
- php: '7.4'
symfony: '^4.0'
phpcq_install: 'install'
output: '-o github-action -o default'
experimental: false
- php: '7.4'
symfony: '^5.0'
phpcq_install: 'update'
output: '-o github-action -o default'
experimental: false
- php: '8.0'
symfony: '^4.0'
phpcq_install: 'update'
output: '-o github-action -o default'
experimental: false
- php: '8.0'
symfony: '^5.0'
phpcq_install: 'update'
output: '-o github-action -o default'
experimental: false
- php: '8.1'
symfony: '^5.0'
phpcq_install: 'update'
output: '-o github-action -o default'
experimental: false
- php: '8.1'
symfony: '^6.0'
phpcq_install: 'update'
output: '-o github-action -o default'
experimental: false
- php: '8.2'
symfony: '^6.0'
phpcq_install: 'update'
output: '-o github-action -o default'
experimental: false
- php: '8.3'
symfony: '^6.0'
phpcq_install: 'update'
output: '-o github-action -o default'
experimental: true
steps:
- name: Pull source
uses: actions/checkout@v2
# see https://github.com/shivammathur/setup-php
- name: Setup PHP with PECL extension
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
# setup caches
- name: Cache composer cache directory
uses: actions/cache@v1
env:
cache-name: composer-cache-dir
with:
path: ~/.cache/composer
key: ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}
- name: Cache vendor directory
uses: actions/cache@v1
env:
cache-name: vendor
with:
path: vendor
key: ${{ runner.os }}-${{ matrix.php }}-${{ matrix.symfony }}-build-${{ env.cache-name }}-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php }}-${{ matrix.symfony }}-build-${{ env.cache-name }}-
- name: Cache phpcq directory
uses: actions/cache@v1
env:
cache-name: phpcq
with:
path: .phpcq
key: ${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}-${{ hashFiles('**/.phpcq.lock') }}
restore-keys: |
${{ runner.os }}-${{ matrix.php }}-build-${{ env.cache-name }}-
# install dependencies and tools
- name: Install composer dependencies
run: |
composer require symfony/process ${{ matrix.symfony }} --no-update
composer require symfony/filesystem ${{ matrix.symfony }} --no-update
composer install
- name: Install phpcq toolchain
run: ./vendor/bin/phpcq ${{ matrix.phpcq_install }} -v
# run tests
- name: Run tests
run: ./vendor/bin/phpcq run -v ${{ matrix.output }}
- name: Upload build directory to artifact
uses: actions/upload-artifact@v2
if: ${{ success() }} || ${{ failure() }}
with:
name: phpcq-builds-php-${{ matrix.php }}-${{ matrix.symfony }}
path: .phpcq/build/