Merge pull request #4340 from Roardom/playlist-comment-delete #3654
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: PHP Static Analysis (Larastan) | |
on: [push, pull_request] | |
jobs: | |
test: | |
strategy: | |
matrix: | |
operating-system: | |
- ubuntu-22.04 | |
php-version: | |
- '8.3' | |
name: php ${{ matrix.php-version }} on ${{ matrix.operating-system }} | |
services: | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_ALLOW_EMPTY_PASSWORD: yes | |
MYSQL_DATABASE: unit3d | |
ports: | |
- 3306:3306 | |
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3 | |
redis: | |
image: redis:5.0 | |
ports: | |
- 6379:6379 | |
options: >- | |
--health-cmd "redis-cli ping" | |
--health-interval 10s | |
--health-timeout 5s | |
--health-retries 5 | |
runs-on: ${{ matrix.operating-system }} | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v4 | |
with: | |
fetch-depth: 0 | |
- name: Setup PHP 8.3 | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: ${{ matrix.php-version }} | |
extensions: bcmath, ctype, dom, fileinfo, json, libxml, mbstring, openssl, pdo, tokenizer, xml, zip | |
coverage: none | |
- name: Install Composer Dependencies | |
env: | |
COMPOSER_AUTH: ${{ secrets.COMPOSER_AUTH }} | |
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist | |
- name: Prepare The Laravel Environment | |
run: cp .env.example .env | |
- name: Generate Application Key | |
run: php artisan key:generate | |
- name: Clear Application Cache | |
run: php artisan optimize:clear | |
- name: Run Larastan | |
run: ./vendor/bin/phpstan analyse -vvv --memory-limit=2G | |
- name: Cache phpstan cache directory | |
uses: actions/cache@v4 | |
with: | |
path: .phpstan.cache | |
key: "phpstan-cache-${{ github.run_id }}" | |
restore-keys: | | |
phpstan-cache- |