Skip to content

Commit

Permalink
Start Xvfb before running tests.
Browse files Browse the repository at this point in the history
Chromium requires a virtual display in headless environments.
  • Loading branch information
tomas-stefano committed Dec 24, 2024
1 parent 76ec764 commit 7e4ea6e
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -242,6 +242,9 @@ jobs:
docker compose exec -T web /bin/sh -c 'bundle config --local disable_exec_load true'
docker compose exec -T web /bin/sh -c 'apk add --no-cache chromium chromium-chromedriver xvfb xauth'
docker compose exec -T web /bin/sh -c "echo 'Checking if chromedriver is installed...'; which chromium; which chromedriver; ls -l /usr/bin/chromium; ls -l /usr/bin/chromedriver; chromium --version; chromedriver --version"
# Ensure that xvfb is set up to allow GUI-based apps like Chromium to run headlessly
docker compose exec -T web /bin/sh -c 'Xvfb :99 -ac &'
docker compose exec -T web /bin/sh -c 'export DISPLAY=:99'
docker compose exec -T web /bin/sh -c 'bundle exec rake parallel:setup'
- name: ${{ matrix.tests }} tests
Expand Down

0 comments on commit 7e4ea6e

Please sign in to comment.