2022-10-28 01:49:15 +00:00
|
|
|
name: Dusk
|
|
|
|
on: [push]
|
|
|
|
jobs:
|
|
|
|
|
|
|
|
dusk-php:
|
|
|
|
runs-on: ubuntu-latest
|
|
|
|
env:
|
|
|
|
APP_URL: "http://127.0.0.1:8000"
|
2022-10-28 01:52:17 +00:00
|
|
|
APP_ENV: dusk
|
2022-10-28 01:49:15 +00:00
|
|
|
DB_USERNAME: root
|
|
|
|
DB_PASSWORD: root
|
|
|
|
MAIL_MAILER: log
|
2022-10-28 01:52:17 +00:00
|
|
|
APP_KEY: "base64:8hOaU5CSjb45bxnFEToJwOsfhOpOvH/g4OWcoJPNyyE="
|
2022-10-28 02:19:21 +00:00
|
|
|
RECAPTCHA_ENABLED: false
|
2022-10-28 01:49:15 +00:00
|
|
|
steps:
|
|
|
|
- uses: actions/checkout@v3
|
|
|
|
- name: Prepare The Environment
|
|
|
|
run: cp .env.example .env
|
|
|
|
- name: Create Database
|
|
|
|
run: |
|
|
|
|
sudo systemctl start mysql
|
|
|
|
mysql --user="root" --password="root" -e "CREATE DATABASE \`panel\` character set UTF8mb4 collate utf8mb4_bin;"
|
|
|
|
- name: Install Composer Dependencies
|
|
|
|
run: composer install --no-progress --prefer-dist --optimize-autoloader
|
|
|
|
- name: Generate Application Key
|
|
|
|
run: php artisan key:generate
|
2022-10-28 01:57:22 +00:00
|
|
|
- name: Install NPM Dependencies
|
|
|
|
run: yarn
|
|
|
|
- name: Build Front End
|
|
|
|
run: yarn build:production
|
2022-10-28 01:49:15 +00:00
|
|
|
- name: Upgrade Chrome Driver
|
|
|
|
run: php artisan dusk:chrome-driver --detect
|
|
|
|
- name: Start Chrome Driver
|
|
|
|
run: ./vendor/laravel/dusk/bin/chromedriver-linux &
|
|
|
|
- name: Run Laravel Server
|
|
|
|
run: php artisan serve --no-reload &
|
|
|
|
- name: Run Dusk Tests
|
|
|
|
run: php artisan dusk
|
|
|
|
- name: Upload Screenshots
|
|
|
|
if: failure()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: screenshots
|
|
|
|
path: tests/Browser/screenshots
|
|
|
|
- name: Upload Console Logs
|
|
|
|
if: failure()
|
|
|
|
uses: actions/upload-artifact@v2
|
|
|
|
with:
|
|
|
|
name: console
|
|
|
|
path: tests/Browser/console
|