Skip to content

fixed codecept timeout #4

fixed codecept timeout

fixed codecept timeout #4

name: Single Test Timeout Debug
on:
push:
branches: [feat/esm]
pull_request:
branches: [feat/esm, 3.x]
jobs:
test-simple-scenario:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- name: npm install
run: |
npm i --force
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- name: Allow Release info Change
run: |
sudo apt-get update --allow-releaseinfo-change
- name: Install browsers and deps
run: npx playwright install && npx playwright install-deps
- name: check
run: './bin/codecept.js check -c test/acceptance/codecept.Playwright.js'
timeout-minutes: 2
- name: start a server
run: 'php -S 127.0.0.1:8000 -t test/data/app &'
- name: start json-server
run: 'npm run json-server &'
- name: wait for servers
run: 'sleep 3'
- name: run simple test with browser restart
run: |
DEBUG=* BROWSER_RESTART=browser ./bin/codecept.js run --config test/acceptance/codecept.Playwright.js --grep "simple page test" --verbose
timeout-minutes: 1
test-complex-scenario:
runs-on: ubuntu-latest
steps:
- uses: actions/checkout@v4
- name: Use Node.js 20.x
uses: actions/setup-node@v4
with:
node-version: 20.x
- uses: shivammathur/setup-php@v2
with:
php-version: 7.4
- name: npm install
run: |
npm i --force
env:
PUPPETEER_SKIP_CHROMIUM_DOWNLOAD: true
- name: Allow Release info Change
run: |
sudo apt-get update --allow-releaseinfo-change
- name: Install browsers and deps
run: npx playwright install && npx playwright install-deps
- name: check
run: './bin/codecept.js check -c test/acceptance/codecept.Playwright.js'
timeout-minutes: 2
- name: start a server
run: 'php -S 127.0.0.1:8000 -t test/data/app &'
- name: start json-server
run: 'npm run json-server &'
- name: wait for servers
run: 'sleep 3'
- name: run simple test with browser restart
run: |
echo "=== Running simple test with browser restart ==="
timeout 60 env BROWSER_RESTART=browser ./bin/codecept.js run --config test/acceptance/codecept.Playwright.js --grep "simple page test" --verbose
echo "Exit code: $?"
timeout-minutes: 2
- name: run complex test with browser restart
run: |
echo "=== Running complex test with browser restart ==="
timeout 120 env BROWSER_RESTART=browser ./bin/codecept.js run --config test/acceptance/codecept.Playwright.js --grep "within on form" --verbose
echo "Exit code: $?"
timeout-minutes: 3