Skip to content

wip

wip #601

Workflow file for this run

name: Laravel
on:
push:
branches:
- "8.*"
- "9.*"
- "10.*"
- "master"
pull_request:
jobs:
laravel-tests:
runs-on: ${{ matrix.os }}
continue-on-error: ${{ matrix.experimental }}
timeout-minutes: 45
strategy:
matrix:
os:
- "ubuntu-latest"
php:
- 7.3
- 7.4
dependencies:
- "highest"
experimental:
- true
name: PHP${{ matrix.php }} on ${{ matrix.os }} (${{ matrix.dependencies }})
services:
mysql:
image: mysql:5.7
env:
MYSQL_ALLOW_EMPTY_PASSWORD: yes
MYSQL_DATABASE: nova_dusk
ports:
- 33306:3306
options: --health-cmd="mysqladmin ping" --health-interval=10s --health-timeout=5s --health-retries=3
redis:
image: redis:5.0
ports:
- 6379:6379
options: --entrypoint redis-server
steps:
- name: Check out repository code
uses: actions/checkout@v3
- name: Setup Node 16
uses: actions/setup-node@v3
with:
node-version: '16.x'
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.example', '.env');"
- uses: actions/checkout@v3
name: Checkout private tools
with:
repository: laravel/nova
token: ${{ secrets.MY_GITHUB_TOKEN }}
path: nova
ref: "4.0"
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
php-version: ${{ matrix.php }}
extensions: dom, curl, libxml, mbstring, zip, pcntl, pdo, sqlite, pdo_sqlite, mysql, mysqli, pdo_mysql, bcmath, intl, fileinfo
coverage: none
- name: Install dependencies
uses: "ramsey/composer-install@v2"
with:
dependency-versions: "${{ matrix.dependencies }}"
composer-options: "--prefer-dist --no-cache"
- name: List Installed Dependencies
run: composer show -D
- name: Publish webpack.mix.js
run: cp ./nova/webpack.mix.js.dist ./nova/webpack.mix.js
- name: Install NPM on Laravel Nova
run: npm --prefix "./nova/" ci
- name: Compile Asset for Laravel Nova
run: npm --prefix "./nova/" run prod
env:
TAILWIND_MODE: build
- name: Generate key
run: php artisan key:generate
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Prepare assets
run: php artisan nova:publish
- name: Prepare storage
run: php artisan storage:link
- name: Upgrade Chrome Driver
run: vendor/bin/dusk-updater detect --auto-update
- name: Prepare Testbench
run: php artisan package:discover
- name: Clear Views
run: php artisan view:clear
- name: Start Chrome Driver
run: vendor/laravel/dusk/bin/chromedriver-linux &
- name: Execute tests (Dusk tests) via PHPUnit
run: vendor/bin/phpunit -c phpunit.dusk.xml --exclude-group=external-network,local-time,date-field,datetime-field --stop-on-error --stop-on-failure
env:
DB_PORT: ${{ job.services.mysql.ports[3306] }}
DB_USERNAME: root
LOG_DEPRECATIONS_CHANNEL: deprecations
RAY_ENABLED: false
- name: Upload Failed Screenshots
uses: actions/upload-artifact@v3
if: failure()
with:
name: "screenshots-php${{ matrix.php }}"
path: tests/Browser/screenshots/*
- name: Upload Console Errors
uses: actions/upload-artifact@v3
if: failure()
with:
name: "console-php${{ matrix.php }}"
path: tests/Browser/console/*
- name: Upload Laravel Logs
uses: actions/upload-artifact@v3
if: failure()
with:
name: "log-php${{ matrix.php }}"
path: storage/logs/*