Skip to content

Commit

Permalink
Try another way
Browse files Browse the repository at this point in the history
  • Loading branch information
ahmad-PH committed Jan 22, 2024
1 parent 8131c32 commit d831f38
Showing 1 changed file with 23 additions and 8 deletions.
31 changes: 23 additions & 8 deletions .github/workflows/ci.yml
Original file line number Diff line number Diff line change
Expand Up @@ -41,14 +41,29 @@ jobs:
chromedriver --url-base=/wd/hub &
sudo Xvfb -ac :99 -screen 0 1280x1024x24 > /dev/null 2>&1 &
# - name: Install ChromeDriver
# run: |
# CHROME_VERSION=$(google-chrome --version | grep -oE "[0-9\.]{2,}")
# CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION")
# curl -L -o chromedriver_linux64.zip "https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip"
# unzip chromedriver_linux64.zip
# sudo mv chromedriver /usr/local/bin/
# rm chromedriver_linux64.zip
- name: Install ChromeDriver
run: |
echo "Retrieving Chrome version..."
FULL_CHROME_VERSION=$(google-chrome --version)
echo "Full Chrome version: $FULL_CHROME_VERSION"
CHROME_VERSION=$(echo $FULL_CHROME_VERSION | grep -oE "[0-9]+" | head -1)
echo "Chrome major version: $CHROME_VERSION"
echo "Fetching the latest ChromeDriver version for Chrome $CHROME_VERSION..."
CHROMEDRIVER_VERSION=$(curl -s "https://chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION")
echo "ChromeDriver version: $CHROMEDRIVER_VERSION"
if [ -z "$CHROMEDRIVER_VERSION" ]; then
echo "Failed to fetch ChromeDriver version!"
exit 1
fi
echo "Downloading ChromeDriver version $CHROMEDRIVER_VERSION..."
curl -L -o chromedriver_linux64.zip "https://chromedriver.storage.googleapis.com/$CHROMEDRIVER_VERSION/chromedriver_linux64.zip"
unzip chromedriver_linux64.zip
sudo mv chromedriver /usr/local/bin/
rm chromedriver_linux64.zip
- name: Run end-to-end tests
run: npm test -- tests/e2e

0 comments on commit d831f38

Please sign in to comment.