@@ -19,17 +19,113 @@ jobs:
19
19
with :
20
20
coverage : none
21
21
php-version : ' 8.2'
22
- - run : composer validate --strict --no-check-lock
22
+ - run : composer validate --strict --no-check-lock --ansi
23
23
24
24
static_analysis :
25
- name : Static analysis
26
- runs-on : ubuntu-latest
27
- steps :
28
- - uses : actions/checkout@v4
29
- - uses : shivammathur/setup-php@v2
30
- with :
31
- coverage : none
32
- php-version : ' 8.2'
33
- - name : Install dependencies
34
- run : composer update --ansi --no-progress --prefer-dist --no-interaction
35
- - run : vendor/bin/phpstan analyze
25
+ name : Static analysis
26
+ runs-on : ubuntu-latest
27
+ steps :
28
+ - uses : actions/checkout@v4
29
+ - uses : shivammathur/setup-php@v2
30
+ with :
31
+ coverage : none
32
+ php-version : ' 8.2'
33
+ - run : composer update --ansi --no-progress --prefer-dist --no-interaction
34
+ - run : vendor/bin/phpstan analyze --ansi --no-progress
35
+
36
+ Official :
37
+ name : " 🛡️ ${{ matrix.name }}"
38
+ uses : " ./.github/workflows/test.yml"
39
+ with :
40
+ name : ${{ matrix.name }}
41
+ driverRepoUrl : ${{ matrix.driverRepoUrl }}
42
+ php : ${{ matrix.php }}
43
+ setUpCmd : ${{ matrix.setUpCmd }}
44
+ testCmd : ${{ matrix.testCmd }}
45
+ tearDownCmd : ${{ matrix.tearDownCmd }}
46
+ strategy :
47
+ fail-fast : false
48
+ matrix :
49
+ include :
50
+ - name : " BrowserKit (http client)"
51
+ driverRepoUrl : " https://github.com/minkphp/MinkBrowserKitDriver.git"
52
+ php : " 7.2"
53
+ # language=bash
54
+ testCmd : ./vendor/bin/phpunit --colors=always --testdox --configuration ./phpunit.http_client.xml
55
+
56
+ - name : " BrowserKit (http kernel)"
57
+ driverRepoUrl : " https://github.com/minkphp/MinkBrowserKitDriver.git"
58
+ php : " 7.2"
59
+ # language=bash
60
+ testCmd : ./vendor/bin/phpunit --colors=always --testdox
61
+
62
+ - name : " Selenium2"
63
+ driverRepoUrl : " https://github.com/minkphp/MinkSelenium2Driver.git"
64
+ php : " 7.2"
65
+ # language=bash
66
+ setUpCmd : |
67
+ export SELENIUM_IMAGE=selenium/standalone-firefox:2.53.1
68
+ docker compose up --wait --quiet-pull
69
+ curl --retry 5 --retry-all-errors --retry-delay 1 --max-time 10 --head -X GET http://localhost:4444/wd/hub/status
70
+ # language=bash
71
+ testCmd : |
72
+ export WEB_FIXTURES_BROWSER=firefox
73
+ export DRIVER_MACHINE_BASE_PATH=/fixtures/
74
+ export WEB_FIXTURES_HOST=http://host.docker.internal:8002
75
+ ./vendor/bin/phpunit --colors=always --testdox
76
+ # language=bash
77
+ tearDownCmd : |
78
+ docker compose logs --no-color --no-log-prefix --timestamps selenium > ./logs/selenium.docker.log
79
+
80
+ - name : " WebDriver-Classic"
81
+ driverRepoUrl : " https://github.com/minkphp/webdriver-classic-driver.git"
82
+ php : " 7.4"
83
+ # language=bash
84
+ setUpCmd : |
85
+ export SELENIUM_IMAGE=selenium/standalone-firefox:4
86
+ docker compose up --wait --quiet-pull
87
+ curl --retry 5 --retry-all-errors --retry-delay 1 --max-time 10 --head -X GET http://localhost:4444/wd/hub/status
88
+ # language=bash
89
+ testCmd : |
90
+ export WEB_FIXTURES_BROWSER=firefox
91
+ export DRIVER_MACHINE_BASE_PATH=/fixtures/
92
+ export WEB_FIXTURES_HOST=http://host.docker.internal:8002
93
+ ./vendor/bin/phpunit --colors=always --testdox
94
+ # language=bash
95
+ tearDownCmd : |
96
+ docker compose logs --no-color --no-log-prefix --timestamps selenium > ./logs/selenium.docker.log
97
+
98
+ Unofficial :
99
+ name : " ✨️ ${{ matrix.name }}"
100
+ uses : " ./.github/workflows/test.yml"
101
+ if : ${{ github.event_name == 'workflow_dispatch' }}
102
+ with :
103
+ name : ${{ matrix.name }}
104
+ driverRepoUrl : ${{ matrix.driverRepoUrl }}
105
+ php : ${{ matrix.php }}
106
+ setUpCmd : ${{ matrix.setUpCmd }}
107
+ testCmd : ${{ matrix.testCmd }}
108
+ tearDownCmd : ${{ matrix.tearDownCmd }}
109
+ strategy :
110
+ fail-fast : false
111
+ matrix :
112
+ include :
113
+ - name : " Chrome"
114
+ driverRepoUrl : " https://gitlab.com/behat-chrome/chrome-mink-driver.git"
115
+ php : " 7.4"
116
+ # language=bash
117
+ setUpCmd : |
118
+ docker run --detach --quiet --net host --volume /dev/shm:/dev/shm --shm-size 2g --volume ./vendor/mink/driver-testsuite/web-fixtures:/fixtures \
119
+ --name chrome zenika/alpine-chrome:latest \
120
+ "--remote-debugging-address=0.0.0.0 --remote-debugging-port=9222 --disable-gpu --headless=new --disable-extensions --no-sandbox --use-gl=swiftshader --disable-software-rasterizer --disable-dev-shm-usage"
121
+ sed "s#http://localhost/#http://localhost:8002/#" phpunit.xml.dist > phpunit.xml
122
+ while ! nc -z localhost 9222 </dev/null; do echo Waiting for chrome to start...; sleep 1; done
123
+ # language=bash
124
+ testCmd : |
125
+ export WEB_FIXTURES_BROWSER=chrome
126
+ export DRIVER_MACHINE_BASE_PATH=/fixtures/
127
+ ./vendor/bin/phpunit --colors=always --testdox
128
+ # language=bash
129
+ tearDownCmd : |
130
+ docker logs chrome > ./logs/chrome.docker.log
131
+
0 commit comments