Skip to content

Commit

Permalink
Add more debugging
Browse files Browse the repository at this point in the history
  • Loading branch information
tomas-stefano committed Dec 24, 2024
1 parent 4d9a2a7 commit 8e7dcea
Showing 1 changed file with 36 additions and 5 deletions.
41 changes: 36 additions & 5 deletions .github/workflows/build-and-deploy.yml
Original file line number Diff line number Diff line change
Expand Up @@ -240,11 +240,42 @@ jobs:
docker compose up --no-build -d
docker compose exec -T web /bin/sh -c "./wait-for-command.sh -c 'nc -z db 5432' -s 0 -t 20"
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 xvfb xauth nss'
# 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'
# Locate and verify Chrome and ChromeDriver
docker compose exec -T web /bin/sh -c "
echo '=== Checking Chrome and ChromeDriver Setup ==='
# Locate Chrome directory dynamically
CHROME_DIR=\$(ls -d /root/.cache/selenium/chrome/linux64/* | head -n 1)
if [ -z \"\$CHROME_DIR\" ]; then
echo 'Error: Chrome directory not found in /root/.cache/selenium/chrome/linux64/'
exit 1
fi
echo 'Chrome directory found: \$CHROME_DIR'
# List files in Chrome directory
echo 'Listing files in Chrome directory:'
ls -l \$CHROME_DIR
echo '=== Checking Chromedriver ==='
ls -l /root/.cache/selenium/chromedriver/linux64/
ls -l /root/.cache/selenium/chromedriver/linux64/*
# Check Chrome version and permissions
CHROME_BINARY=\$CHROME_DIR/chrome
if [ -f \"\$CHROME_BINARY\" ]; then
echo 'Chrome binary found: \$CHROME_BINARY'
chmod +x \$CHROME_BINARY
echo 'Chrome permissions:'
ls -l \$CHROME_BINARY
echo 'Chrome version:'
\$CHROME_BINARY --version || echo 'Error: Unable to execute Chrome binary'
else
echo 'Error: Chrome binary not found in \$CHROME_DIR'
fi
echo '=== Chrome and Chromedriver Setup Check Completed ==='
"
docker compose exec -T web /bin/sh -c 'bundle exec rake parallel:setup'
- name: ${{ matrix.tests }} tests
Expand Down

0 comments on commit 8e7dcea

Please sign in to comment.