mirror of
https://github.com/sp-tarkov/forge.git
synced 2025-02-13 04:30:41 -05:00
66 lines
2.0 KiB
YAML
66 lines
2.0 KiB
YAML
name: Larastan Static Analysis
|
|
|
|
on:
|
|
pull_request:
|
|
push:
|
|
branches-ignore:
|
|
- 'dependabot/**'
|
|
|
|
jobs:
|
|
larastan:
|
|
runs-on: ubuntu-latest
|
|
|
|
steps:
|
|
- name: Checkout Code
|
|
uses: actions/checkout@v4
|
|
|
|
- name: Setup PHP
|
|
uses: shivammathur/setup-php@v2
|
|
with:
|
|
php-version: '8.3'
|
|
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, bcmath, soap, intl, gd, exif, iconv
|
|
coverage: none
|
|
|
|
- name: Configure Laravel Nova Authentication
|
|
shell: bash
|
|
env:
|
|
NOVA_USERNAME: ${{ secrets.NOVA_USERNAME }}
|
|
NOVA_LICENSE_KEY: ${{ secrets.NOVA_LICENSE_KEY }}
|
|
run: |
|
|
composer config http-basic.nova.laravel.com "$NOVA_USERNAME" "$NOVA_LICENSE_KEY"
|
|
|
|
- name: Get Composer Cache Directory
|
|
id: composer-cache
|
|
run: |
|
|
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
|
|
|
|
- uses: actions/cache@v4
|
|
id: actions-cache
|
|
with:
|
|
path: ${{ steps.composer-cache.outputs.dir }}
|
|
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
|
|
restore-keys: |
|
|
${{ runner.os }}-composer-
|
|
|
|
- name: Cache PHP dependencies
|
|
uses: actions/cache@v4
|
|
id: vendor-cache
|
|
with:
|
|
path: vendor
|
|
key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
|
|
|
|
- name: Copy .env
|
|
run: php -r "file_exists('.env') || copy('.env.ci', '.env');"
|
|
|
|
- name: Install Dependencies
|
|
if: steps.vendor-cache.outputs.cache-hit != 'true'
|
|
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
|
|
|
|
- name: Update Dependencies with latest stable
|
|
run: composer update --prefer-stable
|
|
|
|
- name: Execute Code Static Analysis with Larastan
|
|
run: |
|
|
composer require --dev larastan/larastan
|
|
./vendor/bin/phpstan analyse -c ./phpstan.neon --no-progress
|