Skip to content

main/production

main/production #30

name: Pull Request | CI Larastan
on: pull_request
jobs:
larastan:
runs-on: ubuntu-latest
name: pull-request | ci larastan
env:
PHP_VERSION: 8.4
NODE_VERSION: 22
steps:
- name: Checkout code
uses: actions/checkout@v4
- name: Setup PHP Environment
uses: shivammathur/setup-php@v2
with:
php-version: ${{ env.PHP_VERSION }}
extensions: dom, curl, fileinfo, mysql, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv, imagick
- name: Prepare the .env file
run: cp .env.ci .env
- name: Cache Composer Dependencies
uses: actions/cache@v4
with:
path: |
~/.composer/cache/files
~/.composer/cache/repo
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.json') }}
restore-keys: |
${{ runner.os }}-composer-
- name: Install Composer Dependencies
run: composer install --no-progress --prefer-dist --no-interaction --optimize-autoloader
- name: Publish Laravel assets
run: php artisan vendor:publish --tag=laravel-assets --ansi --force
- name: Execute static analysis
run: ./vendor/bin/phpstan analyse
- name: Store Log Artifacts
if: failure()
uses: actions/upload-artifact@v4
with:
name: Store report artifacts
path: ./storage/logs