[Stan]: Fix matrix to test Pimcore 6.9 (#54) #23
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: "Static Analysis" | |
on: | |
pull_request: | |
branches: | |
- "[0-9]+.[0-9]+" | |
- "[0-9]+.x" | |
push: | |
branches: | |
- "[0-9]+.[0-9]+" | |
- "[0-9]+.x" | |
- "*_actions" | |
jobs: | |
static-analysis-phpstan: | |
name: "Static Analysis with PHPStan" | |
runs-on: "ubuntu-20.04" | |
continue-on-error: ${{ matrix.experimental }} | |
strategy: | |
matrix: | |
include: | |
- { php-version: "7.2", dependencies: "lowest", pimcore_version: "", phpstan_args: "", experimental: false } | |
- { php-version: "8.0", dependencies: "highest", pimcore_version: "", phpstan_args: "", experimental: false } | |
- { php-version: "8.1", dependencies: "highest", pimcore_version: "", phpstan_args: "", experimental: false } | |
steps: | |
- name: "Checkout code" | |
uses: "actions/checkout@v2" | |
- name: "Install PHP" | |
uses: "shivammathur/setup-php@v2" | |
with: | |
coverage: "none" | |
php-version: "${{ matrix.php-version }}" | |
- name: "Setup Pimcore environment" | |
run: | | |
.github/ci/scripts/setup-pimcore-environment.sh | |
- name: "Update Pimcore version" | |
env: | |
PIMCORE_VERSION: "${{ matrix.pimcore_version }}" | |
run: | | |
if [ ! -z "$PIMCORE_VERSION" ]; then | |
composer require --no-update pimcore/pimcore:"${PIMCORE_VERSION}" | |
fi | |
- name: "Fix composer plugins (remove when removing Pimcore 6.9 support)" | |
run: | | |
composer config --no-plugins allow-plugins.endroid/installer true | |
composer config --no-plugins allow-plugins.ocramius/package-versions true | |
- name: "Install dependencies with Composer" | |
uses: "ramsey/composer-install@v2" | |
with: | |
dependency-versions: "${{ matrix.dependencies }}" | |
- name: "Run a static analysis with phpstan/phpstan (highest)" | |
if: ${{ matrix.dependencies == 'highest' }} | |
run: "vendor/bin/phpstan analyse --memory-limit=-1" | |
- name: "Run a static analysis with phpstan/phpstan (lowest)" | |
if: ${{ matrix.dependencies == 'lowest' }} | |
run: "vendor/bin/phpstan analyse --memory-limit=-1 -c phpstan-lowest.neon" |