3939
4040 tests :
4141 name : " Tests (PHP ${{ matrix.php }}, Selenium ${{ matrix.selenium_version }})${{ matrix.with_coverage == true && ' with coverage' || ''}}"
42- runs-on : ubuntu-20.04
42+ runs-on : ubuntu-latest
4343 strategy :
4444 matrix :
4545 selenium_version : [ '2.53.1' ]
@@ -74,13 +74,15 @@ jobs:
7474 composer update --no-interaction --prefer-dist
7575
7676 - name : Setup Mink test server
77+ env :
78+ MINK_HOST : 0.0.0.0:8002
7779 run : |
7880 mkdir ./logs
7981 ./vendor/bin/mink-test-server &> ./logs/mink-test-server.log &
8082
8183 - name : Start Selenium
8284 run : |
83- docker run --net host --name selenium --volume /dev/shm:/dev/shm --volume ./vendor/mink/driver-testsuite/web-fixtures:/fixtures --shm-size 2g selenium/ standalone-firefox:${{ matrix.selenium_version }} &> ./logs/selenium.log &
85+ SELENIUM_IMAGE= selenium/ standalone-firefox:${{ matrix.selenium_version }} docker compose up --wait
8486
8587 - name : Wait for browser & PHP to start
8688 run : |
9294 env :
9395 SELENIUM_VERSION : ${{ matrix.selenium_version }}
9496 DRIVER_URL : http://localhost:4444/wd/hub
97+ WEB_FIXTURES_HOST : http://host.docker.internal:8002
9598 WEB_FIXTURES_BROWSER : firefox
9699 DRIVER_MACHINE_BASE_PATH : /fixtures/
97100 run : |
@@ -102,6 +105,7 @@ jobs:
102105 env :
103106 SELENIUM_VERSION : ${{ matrix.selenium_version }}
104107 DRIVER_URL : http://localhost:4444/wd/hub
108+ WEB_FIXTURES_HOST : http://host.docker.internal:8002
105109 WEB_FIXTURES_BROWSER : firefox
106110 DRIVER_MACHINE_BASE_PATH : /fixtures/
107111 run : |
@@ -120,6 +124,11 @@ jobs:
120124 with :
121125 token : ${{ secrets.CODECOV_TOKEN }}
122126
127+ - name : Extract docker logs
128+ if : ${{ failure() }}
129+ run : |
130+ docker compose logs --no-color &> ./logs/selenium.log
131+
123132 - name : Archive logs artifacts
124133 if : ${{ failure() }}
125134 uses : actions/upload-artifact@v4
0 commit comments