Skip to content

Add PHP 8.3, Laravel 11 and Node 20 to GitHub Actions Workflow #39

Add PHP 8.3, Laravel 11 and Node 20 to GitHub Actions Workflow

Add PHP 8.3, Laravel 11 and Node 20 to GitHub Actions Workflow #39

Workflow file for this run

# GithHub Actions Workflow generated with Ghygen
name: Code Quality
on:
push:
branches:
- main
- develop
- features/**
- feature/**
- upgrade/**
jobs:
laravel-tests:
runs-on: ubuntu-latest
strategy:
matrix:
operating-system: [ubuntu-latest, windows-latest]
php-versions: [ '8.2', '8.3' ]
exclude:
- operating-system: windows-latest
php-versions: 8.2
name: PHP ${{ matrix.php-versions }} - OS ${{ matrix.operating-system}}
steps:
- uses: actions/checkout@v4
- name: Setup Bun js for building frontend
uses: oven-sh/setup-bun@v1
- name: Install JS packages
run: bun install
- name: Build frontend
run: bun run build
- name: Install PHP versions
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php-versions }}
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- name: Install Dependencies
if: steps.vendor-cache.outputs.cache-hit != 'true'
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
# Code quality
- name: Execute tests (Unit and Feature tests) via PHPUnit
# Set environment
env:
DB_CONNECTION: sqlite
DB_DATABASE: ":memory:"
run: composer test
- name: Execute Code Sniffer via Pint
run: |
composer cs
- name: Execute Code Static Analysis (PHP Stan + Larastan)
run: |
composer phpstan