Skip to content

Commit def4d2f

Browse files
committed
ci: fix attempt #2
1 parent ea4d447 commit def4d2f

1 file changed

Lines changed: 13 additions & 4 deletions

File tree

.github/workflows/test-runner.yml

Lines changed: 13 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -56,7 +56,8 @@ jobs:
5656
- name: Install and update Playwright
5757
run: |
5858
npm install playwright@latest
59-
npx playwright install
59+
npx playwright install --with-deps
60+
export DISPLAY=:99
6061
6162
- name: Validate composer.json and composer.lock
6263
run: composer validate --strict
@@ -75,6 +76,13 @@ jobs:
7576
coverage: xdebug
7677
extensions: mbstring, gd, intl, pcntl
7778

79+
- name: Start virtual display
80+
run: |
81+
sudo apt-get update
82+
sudo apt-get install -y xvfb
83+
export DISPLAY=:99
84+
Xvfb :99 -screen 0 1024x768x24 > /dev/null 2>&1 &
85+
7886
- name: Install dependencies
7987
run: |
8088
composer require "laravel/framework:${{ matrix.laravel }}" --no-interaction --no-update
@@ -83,20 +91,21 @@ jobs:
8391
8492
- name: Setup testbench environment
8593
run: |
86-
# Ensure .env file exists with proper APP_KEY
8794
cp workbench/.env.example workbench/.env
8895
sed -i 's/APP_KEY=/APP_KEY=base64:ZQvPGC7uVADkjOgtGIIuCI8u3\/Pzu+VaRObIbHsgjCc=/' workbench/.env
8996
sed -i 's/APP_ENV=local/APP_ENV=testing/' workbench/.env
90-
# Verify the key was set correctly
9197
grep "APP_KEY=base64:" workbench/.env
92-
# Run the remaining setup steps that composer setup would run
9398
npm install
9499
php vendor/bin/testbench vendor:publish --tag='filament-shield-config'
95100
php vendor/bin/testbench filament:assets
96101
php vendor/bin/testbench package:sync-skeleton
97102
98103
- name: Run test suite
99104
run: vendor/bin/pest --shard=${{ matrix.shard }}/4 --parallel --coverage-clover ./coverage.xml
105+
env:
106+
BROWSER_HEADLESS: true
107+
BROWSER_SLOW_MO: 100
108+
BROWSER_TIMEOUT: 30000
100109

101110
- name: Upload coverage reports to Codecov
102111
# Make sure the Codecov action is only executed once

0 commit comments

Comments
 (0)