misc_pterodactyl-panel/.github/workflows/dusk.yml

85 lines
2.5 KiB
YAML
Raw Normal View History

2022-10-28 01:49:15 +00:00
name: Dusk
on: [push]
jobs:
dusk-php:
runs-on: ubuntu-latest
env:
2022-10-29 03:26:37 +00:00
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;"
2022-10-29 02:57:41 +00:00
- name: Get Cache Directory
id: composer-cache
run: |
echo "dir=$(composer config cache-files-dir)" >> $GITHUB_OUTPUT
- name: Cache Composer
uses: actions/cache@v3
with:
path: ${{ steps.composer-cache.outputs.dir }}
key: ${{ runner.os }}-composer-8.1-${{ hashFiles('**/composer.lock') }}
restore-keys: |
${{ runner.os }}-composer-8.1-
2022-10-29 03:03:31 +00:00
- name: Install Composer Dependencies
run: composer install --no-interaction --no-progress --prefer-dist --optimize-autoloader
2022-10-28 01:49:15 +00:00
- name: Generate Application Key
2022-10-28 19:30:35 +00:00
run: php artisan key:generate --force --no-interaction
2022-10-29 02:57:41 +00:00
- name: Setup Node
uses: actions/setup-node@v3
with:
node-version: 16
cache: "yarn"
- name: Install dependencies
run: yarn install --frozen-lockfile
- name: Build
2022-10-28 01:57:22 +00:00
run: yarn build:production
2022-10-29 02:57:41 +00:00
2022-10-29 03:20:14 +00:00
- name: Run Laravel Server
run: php artisan serve --no-reload &
2022-10-29 06:55:38 +00:00
- name: Run Laravel Server Pseudo Daemon
run: php artisan serve --no-reload &
2022-10-28 01:49:15 +00:00
- name: Upgrade Chrome Driver
run: php artisan dusk:chrome-driver --detect
- name: Start Chrome Driver
2022-10-29 03:28:43 +00:00
run: ./vendor/laravel/dusk/bin/chromedriver-linux --whitelisted-ips="" &
2022-10-29 03:09:59 +00:00
2022-10-28 01:49:15 +00:00
- name: Run Dusk Tests
run: php artisan dusk
- name: Upload Screenshots
if: failure()
2022-10-28 17:43:08 +00:00
uses: actions/upload-artifact@v3
2022-10-28 01:49:15 +00:00
with:
name: screenshots
path: tests/Browser/screenshots
- name: Upload Console Logs
if: failure()
2022-10-28 17:43:08 +00:00
uses: actions/upload-artifact@v3
2022-10-28 01:49:15 +00:00
with:
name: console
path: tests/Browser/console
2022-10-28 18:19:10 +00:00
- name: Upload Application Logs
if: failure()
uses: actions/upload-artifact@v3
with:
name: application
path: storage/logs