Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Update tests.yml #526

Closed
Closed
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
32 changes: 30 additions & 2 deletions .github/workflows/tests.yml
Original file line number Diff line number Diff line change
Expand Up @@ -2,9 +2,9 @@ name: Continuous Integration

on:
push:
branches: [ master ]
branches: [ master, pp/chrome-driver-integration-failure ]
pull_request:
branches: [ master ]
branches: [ master, pp/chrome-driver-integration-failure ]

jobs:
test:
Expand All @@ -20,6 +20,34 @@ jobs:
- uses: browser-actions/setup-chrome@latest
with:
chrome-version: latest
- name: Download ChromeDriver
run: |
# Get the full Chrome version
CHROME_VERSION=$(google-chrome --version | grep -oP '\d+\.\d+\.\d+\.\d+')
echo "Chrome version: $CHROME_VERSION"

# Get the major version of Chrome
CHROME_MAJOR_VERSION=$(echo $CHROME_VERSION | cut -d '.' -f 1)
echo "Chrome major version: $CHROME_MAJOR_VERSION"

# Get the ChromeDriver version that matches the Chrome major version
CHROMEDRIVER_VERSION=$(curl -sS chromedriver.storage.googleapis.com/LATEST_RELEASE_$CHROME_MAJOR_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

- run: npm ci
- run: npx grunt
- run: npm test
Loading