Skip to content

Commit

Permalink
Update tests.yml
Browse files Browse the repository at this point in the history
  • Loading branch information
PanosNB authored May 14, 2024
1 parent ff205aa commit 4ddcc7b
Showing 1 changed file with 12 additions and 1 deletion.
13 changes: 12 additions & 1 deletion .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -22,13 +22,24 @@ jobs:
chrome-version: latest
- name: Download ChromeDriver
run: |
# Get the Chrome version
# Get the Chrome version
CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+')
echo "Chrome version: $CHROME_VERSION"
# Get the ChromeDriver version that matches the Chrome version
CHROMEDRIVER_VERSION=$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_VERSION)
echo "ChromeDriver version: $CHROMEDRIVER_VERSION"
# Verify the ChromeDriver version was fetched correctly
if [ -z "$CHROMEDRIVER_VERSION" ]; then
echo "Failed to fetch ChromeDriver version"
exit 1
fi
# Download and unzip the ChromeDriver
curl -sS -o /tmp/chromedriver.zip "http://chromedriver.storage.googleapis.com/${CHROMEDRIVER_VERSION}/chromedriver_linux64.zip"
unzip -q /tmp/chromedriver.zip -d /tmp
# Move ChromeDriver to a location in PATH
sudo mv /tmp/chromedriver /usr/local/bin/chromedriver
sudo chmod +x /usr/local/bin/chromedriver
Expand Down

0 comments on commit 4ddcc7b

Please sign in to comment.