Skip to content

Upgrade to Laravel 11 #188

Upgrade to Laravel 11

Upgrade to Laravel 11 #188

Workflow file for this run

name: PHP tests
on:
push:
paths-ignore:
- '*.md'
pull_request:
paths-ignore:
- '*.md'
branches:
- main
jobs:
phpunit:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: 8.2
- name: Copy .env file
run: cp .env.example .env
- name: Configure Composer cache
id: composer-cache
run: echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- uses: actions/cache@v4
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-${{ hashFiles('**/composer.lock') }}
restore-keys: ${{ runner.os }}-composer-
- name: Install Composer dependencies
run: composer install --no-progress --prefer-dist
- name: Generate application key
run: php artisan key:generate
- name: Configure NPM cache
uses: actions/cache@v4
with:
path: node_modules
key: ${{ runner.os }}-npm-${{ hashFiles('**/package-lock.json') }}
restore-keys: ${{ runner.os }}-npm-
- name: Install Node
uses: actions/setup-node@v4
with:
node-version: 12.x
- name: Install NPM dependencies
run: npm ci --prefer-offline --no-audit
- name: Compile NPM dependencies
run: npm run prod
- name: Run PHPUnit tests
run: php vendor/bin/phpunit
- name: Upload logs
uses: actions/upload-artifact@v4
if: failure()
with:
name: Logs
path: ./storage/logs