-
-
Notifications
You must be signed in to change notification settings - Fork 750
88 lines (83 loc) · 2.93 KB
/
single-test-timeout.yml
File metadata and controls
88 lines (83 loc) · 2.93 KB
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
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
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