Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
93 changes: 13 additions & 80 deletions .github/workflows/php.yml
Original file line number Diff line number Diff line change
Expand Up @@ -106,11 +106,10 @@ jobs:
fail-on-severity: critical
license-check: true

code-analysis-php-stan:
static-code-analysis:
runs-on: ubuntu-latest
name: PHPStan
needs:
- composer-validation
name: Static code analysis
needs: composer-validation

steps:
- name: Check out the repository
Expand All @@ -136,91 +135,28 @@ jobs:
key: php-vendor-${{ runner.os }}-${{ github.run_id }}
restore-keys: php-vendor-${{ runner.os }}-${{ github.run_id }}

- name: PHPStan (Src)
run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level max src

- name: PHPStan (Tests)
run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level max tests

code-analysis-php-codesniffer:
runs-on: ubuntu-latest
name: PHPCodeSniffer
needs:
- composer-validation

steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: mbstring, gd, zip

- name: Restore composer.lock from cache
uses: actions/cache@v4
with:
path: composer.lock
key: php-composer-lock-${{ runner.os }}-${{ github.run_id }}
restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }}
- name: PHPLint (Src)
run: php -d memory_limit=-1 vendor/bin/phplint src

- name: Restore vendor directory from cache
uses: actions/cache@v4
with:
path: vendor
key: php-vendor-${{ runner.os }}-${{ github.run_id }}
restore-keys: php-vendor-${{ runner.os }}-${{ github.run_id }}
- name: PHPLint (Tests)
run: php -d memory_limit=-1 vendor/bin/phplint tests

- name: PHP CodeSniffer (Src)
run: php -d memory_limit=-1 vendor/bin/phpcs --standard=PSR12 src

- name: PHP CodeSniffer (Tests)
run: php -d memory_limit=-1 vendor/bin/phpcs --standard=PSR12 tests

code-analysis-phplint:
runs-on: ubuntu-latest
name: PHPLint
needs:
- composer-validation

steps:
- name: Check out the repository
uses: actions/checkout@v4

- name: Set up PHP
uses: shivammathur/setup-php@v2
with:
php-version: '8.4'
extensions: mbstring, gd, zip

- name: Restore composer.lock from cache
uses: actions/cache@v4
with:
path: composer.lock
key: php-composer-lock-${{ runner.os }}-${{ github.run_id }}
restore-keys: php-composer-lock-${{ runner.os }}-${{ github.run_id }}

- name: Restore vendor directory from cache
uses: actions/cache@v4
with:
path: vendor
key: php-vendor-${{ runner.os }}-${{ github.run_id }}
restore-keys: php-vendor-${{ runner.os }}-${{ github.run_id }}

- name: PHPLint (Src)
run: php -d memory_limit=-1 vendor/bin/phplint src
- name: PHPStan (Src)
run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level 10 src

- name: PHPLint (Tests)
run: php -d memory_limit=-1 vendor/bin/phplint tests
- name: PHPStan (Test)
run: php -d memory_limit=-1 vendor/bin/phpstan analyse --level 10 tests

tests-phpunit:
runs-on: ubuntu-latest
name: PHPUnit
needs:
- code-analysis-php-stan
- code-analysis-php-codesniffer
- code-analysis-phplint
needs: static-code-analysis

steps:
- name: Checkout repository
Expand Down Expand Up @@ -273,10 +209,7 @@ jobs:
tests-infection:
runs-on: ubuntu-latest
name: Infection
needs:
- code-analysis-php-stan
- code-analysis-php-codesniffer
- code-analysis-phplint
needs: static-code-analysis

steps:
- name: Checkout repository
Expand Down