-
Notifications
You must be signed in to change notification settings - Fork 164
39 lines (33 loc) · 1.32 KB
/
ci-dusk.yml
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
name: CI - Dusk / Browser
on: workflow_dispatch
jobs:
laravel-tests:
runs-on: ubuntu-latest
steps:
- uses: shivammathur/setup-php@15c43e89cdef867065b0213be354c2841860869e
with:
php-version: '8.3'
- uses: actions/checkout@v2
- uses: shogo82148/actions-setup-mysql@v1
with:
mysql-version: '8.0'
- run: mysql -uroot -h127.0.0.1 -e 'CREATE DATABASE myapp_test'
- name: Copy .env
run: php -r "file_exists('.env') || copy('.env.ci', '.env');"
- name: Install bgpq3
run: sudo apt-get install bgpq3
- name: Install Dependencies
run: composer install -q --no-ansi --no-interaction --no-scripts --no-progress --prefer-dist
- name: Set up Dusk chrome-drover
run: php artisan dusk:update 124
- name: Directory Permissions
run: chmod -R 777 storage bootstrap/cache
- name: Create Database
run: |
cat data/ci/ci_test_db.sql | mysql --default-character-set=utf8mb4 -h 127.0.0.1 -u root myapp_test
- name: Set up Dusk and php serve
run: |
php ./artisan serve &>php-built-in.log &
google-chrome-stable --headless --disable-gpu --remote-debugging-port=9222 http://localhost &
- name: Execute tests (Unit and Feature tests) via PHPUnit
run: vendor/bin/phpunit --testsuite 'Dusk / Browser Test Suite'