Skip to content

Commit

Permalink
Various workflow improvements (#1)
Browse files Browse the repository at this point in the history
  • Loading branch information
uuf6429 authored Sep 28, 2023
1 parent 8855250 commit 9a81918
Showing 1 changed file with 12 additions and 7 deletions.
19 changes: 12 additions & 7 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -52,11 +52,6 @@ jobs:
- name: Checkout
uses: actions/checkout@v3

- name: Start Selenium
run: |
mkdir -p ./logs
SELENIUM_IMAGE=selenium/standalone-${{ matrix.browser }}:${{ matrix.selenium }} docker compose up --no-color &> ./logs/selenium.log &
- name: Setup PHP
uses: shivammathur/setup-php@v2
with:
Expand All @@ -68,14 +63,18 @@ jobs:
run: |
composer update --no-interaction --prefer-dist --ansi --no-progress
- name: Start Selenium
run: |
SELENIUM_IMAGE=selenium/standalone-${{ matrix.browser }}:${{ matrix.selenium }} docker compose up --wait
- name: Wait for selenium to start
run: |
curl --head -X GET --silent --show-error --retry 60 --retry-connrefused --retry-delay 1 --max-time 10 http://172.18.0.2:4444
curl --retry 5 --retry-all-errors --retry-delay 1 --max-time 10 --head -X GET http://localhost:4444/wd/hub/status
- name: Run tests
env:
SELENIUM_VERSION: ${{ matrix.selenium }}
DRIVER_URL: http://172.18.0.2:4444/wd/hub
DRIVER_URL: http://localhost:4444/wd/hub
WEB_FIXTURES_HOST: http://host.docker.internal:8002
WEB_FIXTURES_BROWSER: ${{ matrix.browser }}
DRIVER_MACHINE_BASE_PATH: /fixtures/
Expand All @@ -89,6 +88,12 @@ jobs:
with:
files: coverage.xml

- name: Extract docker logs
if: ${{ failure() }}
run: |
mkdir -p ./logs
docker compose logs --no-color &> ./logs/selenium.log
- name: Archive logs artifacts
uses: actions/upload-artifact@v3
if: ${{ failure() }}
Expand Down

0 comments on commit 9a81918

Please sign in to comment.