Laravel 12 #73
Workflow file for this run
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
name: Tests | |
on: | |
push: | |
branches: | |
- main | |
pull_request: | |
branches: | |
- main | |
permissions: { } | |
jobs: | |
php: | |
name: PHPUnit | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
services: | |
mysql: | |
image: mysql:8.0 | |
env: | |
MYSQL_ROOT_PASSWORD: root | |
MYSQL_DATABASE: carandclassic | |
MYSQL_USER: carandclassic | |
MYSQL_PASSWORD: password | |
ports: | |
- 3306:3306 | |
options: >- | |
--health-cmd="mysqladmin ping --silent" | |
--health-interval=10s | |
--health-timeout=5s | |
--health-retries=3 | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
with: | |
persist-credentials: false | |
- name: Setup PHP | |
uses: shivammathur/setup-php@v2 | |
with: | |
php-version: 8.4 | |
tools: composer:v2 | |
coverage: xdebug | |
- name: Install Dependencies | |
run: composer install --no-interaction --prefer-dist --optimize-autoloader | |
- name: Copy Environment File | |
run: cp .env.example .env | |
- name: Generate Application Key | |
run: php artisan key:generate | |
- name: Tests | |
run: vendor/bin/phpunit | |
js: | |
name: Vitest | |
runs-on: ubuntu-latest | |
permissions: | |
contents: read | |
steps: | |
- name: Checkout | |
uses: actions/checkout@v5 | |
with: | |
persist-credentials: false | |
- name: Setup Node | |
uses: actions/setup-node@v4 | |
with: | |
node-version: '22' | |
cache: 'npm' | |
- name: Install Node Dependencies | |
run: npm ci | |
- name: Build Assets | |
env: | |
LARAVEL_BYPASS_ENV_CHECK: 1 | |
run: npm run test |