Skip to content

Bump vite from 5.4.5 to 5.4.11 in /laravel (#863) #1604

Bump vite from 5.4.5 to 5.4.11 in /laravel (#863)

Bump vite from 5.4.5 to 5.4.11 in /laravel (#863) #1604

Workflow file for this run

---
name: Laravel PHPunit test
on:
push:
branches:
- main
pull_request:
types: [opened, synchronize, reopened]
jobs:
phpunit:
name: "🧹 Laravel PHPUnit (PHP: ${{ matrix.php-versions }} - Laravel: ${{ matrix.laravel }} - ${{ matrix.operating-system}})"
runs-on: ${{ matrix.operating-system }}
# Service container Mysql
services:
mysql:
# Label used to access the service container
image: mysql:latest
env:
MYSQL_USER: laravel_user
MYSQL_PASSWORD: ${{ secrets.DB_PASSWORD }}
MYSQL_ROOT_PASSWORD: ${{ secrets.DB_PASSWORD }}
MYSQL_DATABASE: db_test_laravel
## map the "external" 33306 port with the "internal" 3306
ports:
- 33306:3306
# Set health checks to wait until mysql database has started (it takes some seconds to start)
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=10s --health-retries=3
env:
FOLDER: ./laravel
# continue-on-error: ${{ matrix.php-versions == '8.2' }}
strategy:
fail-fast: false
matrix:
operating-system: [ ubuntu-latest ]
php-versions: ["8.1", "8.2", "8.3"]
laravel: ["10.*"]
include:
- laravel: 10.*
testbench: ^8.0
steps:
- name: Checkout
uses: actions/checkout@v4
with:
fetch-depth: 0
- name: Setup Node.js
uses: actions/setup-node@v4
with:
node-version: "20.x"
- name: Show PHP and NPM version
run: |
npm --version
php --version
- name: Cache node_modules directory
uses: actions/cache@v4
id: node_modules-cache
with:
path: "${{env.FOLDER}}/node_modules"
key: ${{ runner.OS }}-build-${{ hashFiles('**/package.json') }}-${{ hashFiles('**/package-lock.json') }}
- name: Install NPM packages
working-directory: ${{env.FOLDER}}
if: steps.node_modules-cache.outputs.cache-hit != 'true'
run: npm ci
- name: Build frontend
working-directory: ${{env.FOLDER}}
run: npm run build
- name: Setup PHP, with composer and extensions
uses: shivammathur/setup-php@2.31.1
with:
php-version: ${{ matrix.php-versions }}
extensions: mbstring, bcmath
coverage: pcov
- name: Get composer cache directory
id: composer-cache
working-directory: ${{env.FOLDER}}
run: echo "::set-output name=dir::$(composer config cache-files-dir)"
- name: Cache composer dependencies
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: "${{env.FOLDER}}/vendor"
# key: ${{ runner.OS }}-build-${{ hashFiles('**/composer.lock') }}
- name: Copy ENV Laravel Configuration for CI
working-directory: ${{env.FOLDER}}
run: |
php -r "file_exists('.env') || copy('.env.testing', '.env');"
- name: Install Laravel Dependencies
working-directory: ${{env.FOLDER}}
if: steps.vendor-cache.outputs.cache-hit != 'true'
run: composer install --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Show files in folder
working-directory: ${{env.FOLDER}}
run: ls -lao
- name: Generate key
working-directory: ${{env.FOLDER}}
run: |
php artisan key:generate
php artisan config:clear
- name: Directory Permissions
working-directory: ${{env.FOLDER}}
run: chmod -R 777 storage bootstrap/cache
- name: Run Migrations
working-directory: ${{env.FOLDER}}
# Set environment
env:
DB_CONNECTION: mysql
DB_DATABASE: db_test_laravel
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USER: laravel_user
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
run: php artisan migrate
- name: Execute tests (Unit and Feature tests) via PHPUnit
working-directory: ${{env.FOLDER}}
# Set environment
env:
DB_CONNECTION: mysql
DB_DATABASE: db_test_laravel
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USER: laravel_user
DB_PASSWORD: ${{ secrets.DB_PASSWORD }}
run: vendor/bin/phpunit --testdox